...

View Full Version : Changing datetime



eschuppe
03-18-2009, 04:56 AM
I'm trying to use the relaxed punctuation for datetime but I can't figure out how to make it work.
the current format I have is:
0000-00-00 00:00:00

And I would like
MM/DD/YYYY HH:MM

Can someone please tell me how I could do this?

Thank you!

bdl
03-18-2009, 08:52 AM
If this is a server you have some control over, you can configure it to alter the DATETIME syntax with the date_format or datetime_format variables.

What I would suggest, however, is leaving the data format as-is and retrieving it using the DATE_FORMAT() function, so you can display the date in any manner you wish.

guelphdad
03-18-2009, 02:53 PM
If this is a server you have some control over, you can configure it to alter the DATETIME syntax with the date_format or datetime_format variables.

Think I saw a post on this yesterday and those variables can only be set in mysql 6.0.x

I'd use DATE_FORMAT (as you suggested later in your post) myself.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum