|
|
 |
Re: FN-FORUM mysql date
date posted 20th June 2002 16:41
The reverse is easy - use the mysql date_format() function.
to build the mysql date in php use date(mktime($h,$m,$s,$m,$d,$y))
where $h, etc. are got from the php date string. Write yourself a class
holding standard methodsto do this sort of thing so you don't have to keep
rewriting it.
A good option worth considering is holding date/time values in mysql by
holding the unix timestamp in an integer field. That way you can simply
use the php date() function on the result to display it and the result of
the mktime() to store bck again
Tim Ward
www.chessish.com
> can you convert the date from say 19-06-2002 to 2002-06-19 to insert
> using php into the mysql database and then the reverse when echoing the
> data in php?
>
> tia!
>
> Robin Garbutt
|
 |
|