Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Date Format change

 
Dan Silva
Ranch Hand
Posts: 86
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I want the date to be displayed with MM\DD\YYYY instead of the default, with the year first. What's the command to do this. Thanks
 
Dan Silva
Ranch Hand
Posts: 86
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry, I'm looking to do this in SQL. Thanks.
 
Campbell Ritchie
Sheriff
Posts: 51368
87
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I had a look in the MySQL manual and found this. Look particularly at the first additional comment at the bottom.
 
Scott Selikoff
author
Saloon Keeper
Posts: 4032
18
Eclipse IDE Flex Google Web Toolkit
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If its part of JDBC, use ResultSet.getDate() and Java's SimpleDateFormat to change the format. The specific command varies on different databases.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic