File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Oracle/OAS and the fly likes Need Help Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Oracle/OAS
Bookmark "Need Help" Watch "Need Help" New topic

Need Help

Ranch Hand

Joined: Oct 09, 2003
Posts: 517
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 eg.09-SEP-05 13.28.00

How do i convert this timestamp format to mysql format?


God Gave Me Nothing I Wanted<br />He Gave Me Everything I Needed<br /> - Swami Vivekananda
Mark Spritzler

Joined: Feb 05, 2001
Posts: 17276

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.


Perfect World Programming, LLC - iOS Apps
How to Ask Questions the Smart Way FAQ
I agree. Here's the link:
subject: Need Help
It's not a secret anymore!