I have two dates with times like this:
Start date/time = 2006-01-01 08:12
End date/time = 2006-01-07 10:45
I want to take the End date/time and subtract Start date/time from it.
I want the results in days, hours and minutes.
Like this example:
4 days, 3 hours and 52 minutes.
How do I do that in PHP?
How do I subtract 2 dates/times?
Moderator: General Moderators
strtotime() and then subtract one from the other.
Note that your dates have to be in a standard format.
Note that your dates have to be in a standard format.
- feyd
- Neighborhood Spidermoddy
- Posts: 31559
- Joined: Mon Mar 29, 2004 3:24 pm
- Location: Bothell, Washington, USA
viewtopic.php?t=29341 may be of interest.