Re: date functions

From: Date: Mon, 23 Sep 2002 20:55:35 +0000
Subject: Re: date functions
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-117321@lists.php.net to get a copy of this message
Patrick Off the top of my head... Convert both date1 and date2 to unix timestamps, and subtract one from the other. That will give you the number of seconds between them. Then, convert to hours, minutes, etc as required. Peter At 10:38 PM 9/23/2002 +0200, Patrick wrote:
i got 2 dates and i want to know how many minutes between em,, like: $date1 = date("Y-m-j H:i"); $date2 = date("Y-m-j H:i", strtotime("now") + 1800); $minutes = date_something($date1, $date2); echo "there are $minutes between, $date1 and $date2"; regards patrick -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
- - - - - - - - - - - - - - - - - - - - - Fourth Realm Solutions pbechard@fourthrealm.com http://www.fourthrealm.com Tel: 519-739-1652 - - - - - - - - - - - - - - - - - - - - -

« previous php.general (#117321) next »