Reputation: 41
I have to add a column into my DB oracle SQL DEVELOPER.
This column needs the format HH:MI:SS
, but when I set the column as timestamp,
it convert me the column as : DD-MM-YY HH:MI:SS
, even if I change NLS Settings
.
Upvotes: 1
Views: 169
Reputation: 37
You can change the preferences as follows:
Go to Tools > Preferences
.
In Preferences
dialog, select Database > NLS
from the left panel.
From the list of NLS parameters
, enter HH:MI:SS
into the Timestamp Format
field.
Save and close the dialog.
Upvotes: 2
Reputation: 17839
The actual value saved in the db in not even that. What is saved in the database is a number that represents the date. What you actually see is how the SQL Developer represents that date, and not how it is actually stored.
You can print the date in the format you want using to_char()
:
select to_char(sysdate, 'HH:MI:SS') as "Current Time" from dual;
Upvotes: 1