60 seconds in an minute 60 minutes in an hour 24 hours in a day 3 days needed therefor: 60 * 60 * 24 * 3
Its worth noting there are 3600 seconds in 1 hour... so you could use 3600 * 24 * 3 ----- Original Message ----- From: "Constantin Baciu" <[EMAIL PROTECTED]> To: "Stephen Edmonds" <[EMAIL PROTECTED]> Sent: Thursday, October 31, 2002 8:07 AM Subject: Re: [PHP-WIN] Date Increment Problem > Correct me if I am wrong, but I think that the seconds in 3 days are 60*24*3 > (as opposed to 60*60*24*3) > > ----- Original Message ----- > From: "Stephen Edmonds" <[EMAIL PROTECTED]> > Newsgroups: php.windows > To: "PHP Helplist Windows" <[EMAIL PROTECTED]>; "Raheel Hussain" > <[EMAIL PROTECTED]> > Sent: Wednesday, October 30, 2002 7:36 PM > Subject: Re: [PHP-WIN] Date Increment Problem > > > > Firstly, you need to understand time. > > > > Time in computers is stored as the number of seconds since January 1st, > > 1970. The time now is 1035999078 (Or to humans, 17:31:30 on the 30th Oct). > > When you call the current time with time() it returns that long number > > above. You can then add on 1 days worth of seconds to figure out when > > tommorow is > > > > $CurrentTime = time(); > > $TommorowTime = $CurrentTime + ( 60 * 60 * 24 * 3 ); > > > > You can then use date() to transform that number in to human form > > > > $HumanDate = date( d/n/y H:i, $TommorowTime ); > > print $HumanDate; > > > > Hope this helps > > > > Stephen > > > > ----- Original Message ----- > > From: "Raheel Hussain" <[EMAIL PROTECTED]> > > To: <[EMAIL PROTECTED]> > > Sent: Wednesday, October 30, 2002 11:04 AM > > Subject: [PHP-WIN] Date Increment Problem > > > > > > > > > > hi, I m a newbie programmer, may b solve to this prob. is a cheap thing, > > but i cant get solution of it. > > > > > > i have two variables > > > $RegisterDate, and $ExpireDate > > > > > > what I want to do is the the $RegisterDate will be taken from the > system. > > > but the $ExpireDate will be three days after the $RegisterDate, > > > > > > i m doing this in the following way, but having problems, i cant find > the > > way to increment the data for after three days > > > > > > $RegisterDate=date("m/d/y"); > > > $ExpireDate=$RegisterDate + 3 //creating problem, > > > > > > if the register date is 10/29/01 then the expire date should be 11/2/02. > > > > > > plz help > > > > > > > > > > > > --------------------------------- > > > Do you Yahoo!? > > > HotJobs - Search new jobs daily now > > > > > > > ------------------------------------------------------------------------ > P.S. Stiai ca s-a lansat www.FreeSMS.ro ? > -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php