I am running some queries to track down a problem with our backup logs and would like to display datetime fields in 24-hour military time. Is there a simple way to do this? I've tried googling and could find nothing.
A:
It's not oracle that determines the display of the date, it's the tool you're using to run queries. What are you using to display results? Then we can point you to the correct settings hopefully.
Nick Craver
2008-09-19 15:31:21
+1
A:
Use a to_char(field,'YYYYMMDD HH24MISS').
A good list of date formats is available at http://www.ss64.com/orasyntax/fmt.html
Grant Johnson
2008-09-19 15:32:05
+1
A:
If you want all queries in your session to show the full datetime, then do
alter session set NLS_DATE_FORMAT='DD/MM/YYYY HH24:MI:SS'
at the start of your session.
Matthew Watson
2008-09-20 04:03:11