Skip to Main Content

SQL Developer

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Oracle SQL developer - how to display date with TIME

708357Jun 23 2009 — edited Jun 23 2009
Ok I have change the NLS setting to DD-MON-RR HH.MI.SS
(Tools -> Preferences -> Database -> NLS parameter)

btw does that change the format in the database or just on my client side? I don't want to change the database and other users would be affected by my change.


I can verify the date time displays by doing
SELECT TO_CHAR(SYSDATE + 1, 'DD-MON-YYYY HH:MI:SS') FROM dual;

Returns
24-JUN-2009 10:32:55

OK here is my issue or question.....
but I wan't do to is ...I have a column in a table that stores a number which is minutes from a given date....
the given date is 12/30/1899 00:00:00

So I want to display those minutes in a date and time format... but when I do
select To_TIMESTAMP('12/30/1899 00:00:00','mm/dd/yyyy HH24:MI:SS') + (Start_Moment) / 1440,
To_Date('12/30/1899 00:00:00','mm/dd/yyyy HH24:MI:SS') + (Stop_Moment) / 1440
from tableA

RESULTS
22-JUN-09 23-JUN-09

I tried the TO_CHAR function but not getting the time either like
select TO_CHAR(to_date('12/30/1899 00:00:00', 'mm/dd/yyyy HH24:MI:SS')+ 57580140 / 1440 ) from dual

RESULTS
22-JUN-09

I'm sure this is just simple convert function that I don't know about....
This post has been answered by sb92075 on Jun 23 2009
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 21 2009
Added on Jun 23 2009
6 comments
4,516 views