Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Need Help

 
MInu
Ranch Hand
Posts: 517
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have tried to run my current web application with Oracle Server.
In this test, i have faced a problem on date and time type in Oracle as compared to MySQL.

Date Time Format in MySQL
-> yyyy-MM-dd hh:mm:ss eg.1983-09-05 13:28:00

TimeStamp Format in Oracle
-> dd-MMM-yy hh.mm.ss eg.09-SEP-05 13.28.00

How do i convert this timestamp format to mysql format?

Thanks.
 
Mark Spritzler
ranger
Sheriff
Posts: 17276
6
IntelliJ IDE Mac Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hmm, tough to figure out if this is a Java question or an Oracle SQL questions.

In Java, there are DateFormat classes that can parse one date(string) and then format it into a new one date(string).

In Oracle, there is the to_char() which takes a date, and a format and returns a String in that format. Is there a to_date(). Sheesh, no SQL coding in almost a year and see what you forget.

Mark
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic