Xalion
Xalion

Reputation: 657

SQL DEV doesn't show full DATE

I use Oracle SQL Developer and Query Result doesn't return me full date. Also the same format (yyyy/mm/dd) in table -> data. How to fix this? I didnt find any option which would help.

enter image description here

Upvotes: 3

Views: 9019

Answers (3)

Utsav
Utsav

Reputation: 8093

This is due to your NLS_DATE_FORMAT settings, which decide how a date is displayed on the client.

To change it permanently,

Go to Tool -> Preference -> Database -> NLS and set date format to YYYY/MM/DD HH24:MI:SS or whatever you want.

Upvotes: 1

Stefano Zanini
Stefano Zanini

Reputation: 5916

That's because the default behaviour of SQL Developer is to ony show the date part. Try forcing the output to be displayed as a datetime string this way

select  id, id_player, id_map, x, y, to_char(time, 'yyyy/mm/dd hh24:mi:ss')
from LOGI

Upvotes: 1

a1ex07
a1ex07

Reputation: 37354

It's just formatting issue. Goto "Tools->Preferences->Database->NLS" , set Date Format to something like "YYYY-MM-DD hh24:mi:ss" .

or you can run ALTER SESSION SET NLS_DATE_FORMAT = 'YYYY-MM-DD hh24:mi:ss'

Upvotes: 7

Related Questions