Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to Change the Oracle Date Format From dd-mmm-yyyy ?

Status
Not open for further replies.

ihda

MIS
Apr 6, 2001
46
US
I'm using DreamWeaver MX to write a date field to an Oracle 9i database. The date is not the system date.

The only way I can enter the date is in the format: dd-mmm-yy. How can I change the format in DreamWeaver to enter the date as mm/dd/yyyy?

Thank you.
 
Not an Oracle expert but you probably should use the Oracle TO_DATE() function to convert to Oracle format.

TO_DATE(DateString,Format)

So
Code:
INSERT INTO table (field) VALUES(TO_DATE('03/05/2005','mm/dd/yyyy')
Should work. However in theory this should not be required as if you pass your date as a string ('03-05-2005') Oracle should do the conversion "on the fly".

Chris.

Indifference will be the downfall of mankind, but who cares?
Woo Hoo! the cobblers kids get new shoes.
Nightclub counting systems

So long, and thanks for all the fish.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top