Hi,

I`m trying to get the difference between two date/times and then state how 
many days, hours and minutes there are between them. 

So I take my date and convert it into unix time. Then get the current time, 
and then subtract the two to get the current difference in unix seconds. What 
I`m having trouble doing is working out how many days hours and minutes are 
left over.

For example if I have the date/time: 2001-07-01 01:10:00
And the current date/time was: 2001-07-02 00:00:00
Then I would like to display 1 Day 1 Hour 10 Minutes.

Any one have any suggestions, this is my code so far.

$date1_formated = "$DateEnd $TimeEnd";
$date1 = strtotime($date1_formated); //converts to a UNIX timestamp
$date2 = time(); //returns current UNIX timestamp
$seconds_between = $date1 - $date2;

TIA
Ade

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to