Results 1 to 2 of 2
Thread: change "date" format in MySQL
May 2, 2001, 10:01 #1
Is there a way to change the "date" format from the 0000-00-00 format to 00-00-0000 (day, month, year)?
May 2, 2001, 11:09 #2
- Join Date
- Aug 2000
- San Diego, CA
- 0 Post(s)
- 0 Thread(s)
No, and why would you want to. You an always format the date on the way out, that is why MySQL does this, and I assume all true RDBMS(plus MySQL) do it, so they can keep a standardized way to store a date, that way you can use the plethera of built-in date functions within MySQL for instance to pulla date out of the database in the format you want you would simply include this in your select statement:
DATE_FORMAT(datefield, '%m-%d-%Y') as formatted_date
select DATE_FORMAT(datefield, '%m-%d-%Y') as formatted_date from tablename
Check this out for all the functiuons you can use on date columns in MySQL
http://mysql.he.net/documentation/my...time_functionsPlease don't PM me with questions.
Use the forums, that is what they are here for.