File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Date Format change

 
Dan Silva
Ranch Hand
Posts: 86
  • 0
  • 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
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry, I'm looking to do this in SQL. Thanks.
 
Campbell Ritchie
Sheriff
Pie
Posts: 47229
52
  • 0
  • 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: 3888
15
Eclipse IDE Flex Google Web Toolkit
  • 0
  • 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