Re: [PHP] Best way for date/time

2002-05-11 Thread olinux
Have a look at ADDDATE() and SUBDATE() mysql> SELECT DATE_ADD("1997-12-31 23:59:59", -> INTERVAL 1 DAY); -> 1998-01-01 23:59:59 DATE_FORMAT(date,format) will also be very helpful to use in your queries, allowing you to return your mysql date in a human friendly forma

RE: [PHP] Best way for date/time

2002-05-11 Thread John Holmes
> Okay so I've then got > > 2002-05-08 > and whats then the best way to manipulate it regarding > plus 3 days or plus 4 weeks ? I definitely agree to use the MySQL format for your dates. It makes it easier to use the built in functions. You can convert the timestamp to a unix style if you have t

RE: [PHP] Best way for date/time

2002-05-11 Thread David Freeman
> Okay so I've then got > > 2002-05-08 > and whats then the best way to manipulate it regarding > plus 3 days or plus 4 weeks ? Do it in your sql query - check out the date manipulation stuff in the sql manual - it's quite comprehensive and tells you what you need to know. CYA, Dave -

Re: [PHP] Best way for date/time

2002-05-11 Thread John Fishworld
Okay so I've then got 2002-05-08 and whats then the best way to manipulate it regarding plus 3 days or plus 4 weeks ? > > lol ! no thats not what I meant ! > > what's best to put into MySQL > > datetime from MySQL > > now() > > or from php date ! > > > > Regarding the format - its a german si

Re: [PHP] Best way for date/time

2002-05-11 Thread Jason Wong
On Saturday 11 May 2002 19:55, John Fishworld wrote: > lol ! no thats not what I meant ! > what's best to put into MySQL > datetime from MySQL > now() > or from php date ! > > Regarding the format - its a german site so not expecting many yanks there > ! Sorry :) In that case it's best to stick

Re: [PHP] Best way for date/time

2002-05-11 Thread John Fishworld
lol ! no thats not what I meant ! what's best to put into MySQL datetime from MySQL now() or from php date ! Regarding the format - its a german site so not expecting many yanks there ! :-)) > On Saturday 11 May 2002 19:42, John Fishworld wrote: > > Due to the large variety of MySQL and PHP dat

Re: [PHP] Best way for date/time

2002-05-11 Thread Jason Wong
On Saturday 11 May 2002 19:42, John Fishworld wrote: > Due to the large variety of MySQL and PHP date time formats > I'd like to have a couple of opinions from people out there ! > > Building a job database - and one of my fields is of course date time ! > Which I want to be able to use latter in

[PHP] Best way for date/time

2002-05-11 Thread John Fishworld
Due to the large variety of MySQL and PHP date time formats I'd like to have a couple of opinions from people out there ! Building a job database - and one of my fields is of course date time ! Which I want to be able to use latter in show all from last week, last month etc ! Also I want to show