MySQL Forums
Forum List  »  Newbie

Need help on a seemingly simple datetime field problem.
Posted by: Andrew Krug
Date: May 25, 2005 12:02PM

I need to have a datetime field that auto-updates itself in the format yyyy-mm-dd hh:mm:ss.

Because of the formatting required I cannot use the timestamp field type. If I create a datetime field with the default value of now(). All I get is 0000-00-00 00:00:00.

Is there a way to accomplish this WITHOUT passing the update through code. Meaning have the database update the record automatically and not have to do this through an update statement? Thank you in advance.

Options: ReplyQuote


Subject
Written By
Posted
Need help on a seemingly simple datetime field problem.
May 25, 2005 12:02PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.