This week's book giveaway is in the OCMJEA forum.
We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line!
See this thread for details.
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


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Products » Oracle/OAS
Bookmark "Need Help" Watch "Need Help" New topic
Author

Need Help

MInu
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 hh.mm.ss eg.09-SEP-05 13.28.00

How do i convert this timestamp format to mysql format?

Thanks.


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

Joined: Feb 05, 2001
Posts: 17250
    
    6

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


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
 
Consider Paul's rocket mass heater.
 
subject: Need Help