This content has been marked as final. Show 4 replies
achtung wrote:A column of type DATE will ALWAYS store the time component.
This works for the date but the time is not stored. When I select on the EVENT_DATE the following displays:
I changed the NLS_DATE_FORMAT = MM/DD/RRRR.
Now it displays
But, still no time. Any suggestions?
However, most Oracle databases are configured to only display the date component when selecting a DATE column.
To display the time component, you MUST ensure that it will be displayed. There are 3 ways to do that
1) Configure the database to display the time component for all dates;
2) Configure the SESSION to display the time component for all dates; and/or
3) Use the TO_CHAR function and add the format to that displays the time component.
Your NLS_DATE_FORMAT only is designed to show the date component. Use 'hhmiss' to add Hours, Minutes and Seconds.
And read the fine SQL Langiuage Reference manual, chapter 2, to get an idea how to use the other several dozen formatting capabilities.