SQL Language (MOSC)

MOSC Banner

Date Does Not Appear In Select With Date Format

edited Mar 16, 2010 11:20AM in SQL Language (MOSC) 26 commentsAnswered ✓
 Hi Folks

I am having a problem understanding why a date format does not work on this particular date column. I tried 4 different formats and other then the TRUNC format, the others do not reflect any value other than zeros. Can anyone shed any light on this as I am stumped ?

======================

simple select (date appears)

select
eventid,
auditdate
from
dauditnew
where
dataid = 3516528
and
eventid=32022344;

output:

   EVENTID AUDITDATE
---------- ---------
  32022344 20-APR-57

date formats ( no date values for 3,4,5)


select
eventid,
auditdate date1,
TRUNC(auditdate) date2,
to_char (AUDITDATE,'dd-mon-yyyy') date3,
to_char (AUDITDATE,'mm/dd/yyy') date4,
to_char (AUDITDATE,'mm/dd/yyyy  HH12:MI:SS') date5

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center