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

format a string to be a 24 hour date 1

Status
Not open for further replies.

raged

Programmer
Feb 5, 2005
1
BR
Please help me - I need to format the following string to be a 24 date. I can get it to work for 12 hours....

TO_DATE('25-Sep-00 11:29:40','DD-MON-YY HH:MI:SS')

but if I try:

TO_DATE('25-Sep-00 18:29:40','DD-MON-YY HH:MI:SS')

it says hour must be between 1 and 12 - I need a 24 hour version.

Thanks
 
Change the format string 'DD-MON-YY HH:MI:SS' to 'DD-MON-YY HH24:MI:SS'.

Hope that helps...
[sig]<p>Terry M. Hoey<br><a href=mailto:th3856@txmail.sbc.com>th3856@txmail.sbc.com</a><br><a href= > </a><br>Ever notice that by the time that you realize that you ran a truncate script on the wrong instance, it is too late to stop it?[/sig]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top