RE: [PHP] Date problems

2007-01-04 Thread Beauford
Yea, I just figured this out. When I cut and pasted I must have overwrote the =. Thanks > -Original Message- > From: Stut [mailto:[EMAIL PROTECTED] > Sent: January 4, 2007 4:27 PM > To: Beauford > Cc: PHP > Subject: Re: [PHP] Date problems > > Beauford wrote:

Re: [PHP] Date problems

2007-01-04 Thread Stut
Beauford wrote: $query "select count(date) as count, YEAR(date) as thisyear from stats group ^ = needed here by thisyear"; -Stut -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Date problems

2006-04-09 Thread Rasmus Lerdorf
Satyam wrote: Timestamps are stored as seconds from a certain date. The base date differ depending on the platform, Windows use 1/1/1980 the rest 1/1/1970, but still seconds. 7 days are 7*24*60*60. Just add that much to a timestamp. It helps having a constant such as: define ('DAY_IN_SECO

Re: [PHP] Date problems

2006-04-09 Thread Satyam
Timestamps are stored as seconds from a certain date. The base date differ depending on the platform, Windows use 1/1/1980 the rest 1/1/1970, but still seconds. 7 days are 7*24*60*60. Just add that much to a timestamp. It helps having a constant such as: define ('DAY_IN_SECONDS',86400); S

Re: [PHP] Date problems

2006-04-08 Thread Rasmus Lerdorf
Rasmus Lerdorf wrote: Mace Eliason wrote: Hi, I am having troubles adding 7 days to the current date. I have been reading through php.net date() and this is what I have come up with but it doesn't work $today = date('m/d/Y'); $nextweek = date('m/d/Y',mktime(date("m"), date("d")+7, date("Y")

Re: [PHP] Date problems

2006-04-08 Thread Rasmus Lerdorf
Mace Eliason wrote: Hi, I am having troubles adding 7 days to the current date. I have been reading through php.net date() and this is what I have come up with but it doesn't work $today = date('m/d/Y'); $nextweek = date('m/d/Y',mktime(date("m"), date("d")+7, date("Y"))); if I echo the abov

Re: [PHP] date problems

2002-02-04 Thread Edward van Bilderbeek - Bean IT
i think it is the strtotime() function that gives the trouble... why don't you try mktime() ? > sounds like it might have something to do with leap year. > > Jim Lucas > - Original Message - > From: "toni baker" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Monday, February 04,

Re: [PHP] date problems

2002-02-04 Thread Jim Lucas [php]
sounds like it might have something to do with leap year. Jim Lucas - Original Message - From: "toni baker" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, February 04, 2002 12:03 PM Subject: [PHP] date problems > $date1 = "12/12/2001"; > $date1 = date("D M j Y", strtotime($d