Re: Date aritmetic

From: Date: Thu, 03 Jan 2002 03:20:19 +0000
Subject: Re: Date aritmetic
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-79283@lists.php.net to get a copy of this message
Not mentioning that you could've taken a look at http://www.php.net/manual/en/ref.datetime.php yourself, here goes: $days_diff=(mktime(0,0,0,$month2,$day2,$year2)-mktime(0,0,0,$month2,$day2,$year2))/86400; Bogdan Carlos Fernando Scheidecker Antunes wrote: > Hello all, > > I would like to know if anyone could help me with the following issue: > > I have 6 variables, two holds a day, others the month and the last ones the year. They are > entered through drop-down-menus where the user selects day, month and year for each date. > > I would like to know the difference in days between these two dates. Since the dates are > separated and each value day, month and year are stored on separated variables I wonder who to > proceed here. I need to know how many days of separate each dates. > > Thank you in advance, > > Carlos Fernando > Salt Lake City, UT. > Linux User #207984

« previous php.general (#79283) next »