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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

date convert 1

Status
Not open for further replies.

Abslag

Technical User
Mar 24, 2005
42
US
I have a field that contains date/time info but I need to convert it to a legible date time format. It is formatted like '20051206135428' and I would like for it to read 12-06-2005 01:54.28 pm (mm-dd-yyyy hh:mi:ss) or I could even drop the time and say mm-dd-yyyy. Whichever is simpler. Any comments would be appreciated.
 
Use To_Char(To_Date('20051206135428','YYYYDDMMHH24MISS'),'DD-MM-YYYY HH:MI:SS pm')
 
Oops, the date formats should be 'YYYYMMDDHH24MISS' and 'MM-DD-YYYY HH:MI:SS pm'.
 
Lewisp,
I knew it was simple, but it had me going in circles. Thanks a ton.
[rockband]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top