Re: date calculations

From: Date: Mon, 04 Mar 2002 12:01:52 +0000
Subject: Re: date calculations
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-87075@lists.php.net to get a copy of this message
Yow Sven, > I need to calculate the Time ( days hour minutes between 2 times ) > I have something but I have an error margine of 10 % and that is to high > > Time one 2002/02/24 10:23:43 > Time two 2002/02/02 12:43:12 > > this need to give me the correct time in days hours and minutes between the > 2 dates The broad answer would be to convert the values to (UNIX epoch) timestamps, do the calculation, and then convert back to your preferred presentation format. Where do the dates come from - a database? Are they ISO format dates? (in which case the separator should be - not /) It can be done! =dn

« previous php.general (#87075) next »