Click here to Skip to main content
15,898,035 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hello friend
i want to know that if i change the date format or the location of the my system it will affect the date format of MySQL format?
Posted
Updated 21-Mar-12 1:56am
v2
Comments
ZurdoDev 21-Mar-12 7:46am    
I have not used MySQL but every other database I have used do not store a format with the date. The date is merely a number in the database. It is then formatted when shown to a user.
niravbhavsar 21-Mar-12 7:57am    
ya i know that. it can be easily done. when we get the date from database and display it.

1 solution

Generally, you should not use any date format with a database - since you don't know the display format preferred by the user on the display machine, which could be a very, very long way away.

In fact, MySql conversions default to yyyy-MM-dd (just like Sql Server) and it is a much, much better idea not to mess with this - return the date to your application as a Date or DateTime value, and post-process it into the user preferred format there.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900