By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,947 Members | 1,594 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,947 IT Pros & Developers. It's quick & easy.

how to change date format

P: 1
I'm using mysql, and used field with DATE type
the default date format in my database is yyyy/mm/dd
how to change the date format to dd/mm/yyyy
Sep 8 '07 #1
Share this Question
Share on Google+
2 Replies

Expert 5K+
P: 5,058
Hi and welcome to The Scripts!

You can use the DATE_FORMAT() function in your SQL query.
For example:
Expand|Select|Wrap|Line Numbers
  1. SELECT Date_Format(NOW(), '%d %m %Y')
Which returns '08/09/2007'
Sep 8 '07 #2

Expert 5K+
P: 5,821
Heya, Teno. Welcome to TSDN!

MySQL has a variable for changing the default date format... but it hasn't been implemented yet.
Sep 8 '07 #3

Post your reply

Sign in to post your reply or Sign up for a free account.