|
Posted by Tom on 03/30/07 18:07
On Thu, 29 Mar 2007 01:06:02 +1000, Schmalz wrote...
>
>Hi again all,
>
>Just here to pick some more brains.
>
>I have some code that gets a date from a MySQL database and does some weird
>and wonderful calucaltions with it.
>
>I wish to store the end result back into the MySQL database. When I try it,
>using a number of different methods, it doesn't work.
>
>Any ideas as to the best way to store a date in a MySQL database using php?
>
>Thanks again in advance.
>
>Regards,
>
>Schmalz
>
>
Depending how you have the column configured in your table, you probably have to
format the entry a specific way. As an example, I have a different tables with
different references to date/time.
On the first is use "timestamp" so I need to format my date like
YYYYMMDDHHMMSS
20070216163235
On the other it uses "datetime" so I need to use this format instead
YYYY-MM-DD HH:MM:SS
2007-02-16 16:32:35
Tom
--
Newsguy.com
75+ Days Retention!
Higher levels of article completion!
Broader newsgroups coverage
[Back to original message]
|