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 show
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 date
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 to
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 site so not
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
--
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 to,
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 format of
7 matches
Mail list logo