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

Date Format as dd-mm-yyyy

P: 1
I would like to insert the date as in the dd-mm-yyyy format in sql, can anyone suggest me the syntax
Feb 26 '12 #1
Share this Question
Share on Google+
1 Reply


10K+
P: 13,264
You don't store dates in the database according to a certain format. Date formats are only important to users when you display the date to them or when they capture a date on some screen. In that case you would format the date according to their preferences (typically locale).
If you have text then you can convert it to a date using the STR_TO_DATE function.
Feb 27 '12 #2

Post your reply

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