PL/SQL (MOSC)

MOSC Banner

Datetime trunc in where clase

edited Sep 4, 2017 5:00AM in PL/SQL (MOSC) 2 commentsAnswered

I am writing and comparing results of two queries:

select to_char(cast((from_tz(ntimestamp# ,'00:00') at local) as date) ,'YYYY-MM-DD HH24:MI:SS') from sys.aud$

where cast((from_tz(ntimestamp# ,'00:00') at local) as date)  < to_char(trunc(sysdate - 1, 'DD'), 'YYYY-MON-DD HH24:MI:SS')

order by ntimestamp# asc;

TO_CHAR(CAST((FROM_                     

-------------------

2017-08-13 23:59:40

2017-08-13 23:59:40

2017-08-13 23:59:41

2017-08-13 23:59:41

2017-08-13 23:59:41

2017-08-13 23:59:41

2017-08-13 23:59:42

2017-08-13 23:59:42

2017-08-13 23:59:43

2017-08-13 23:59:43

and

select to_char(cast((from_tz(ntimestamp# ,'00:00') at local) as date) ,'YYYY-MM-DD HH24:MI:SS') from sys.aud$

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