(Since it is nearly 7:00 p.m. in Sem's part of the world (Kiev, Ukraine), and he may have gone home to his lovey family, I'll contribute here in his behalf.)
Given Sem's code:
Code:
...between trunc(sysdate) - 1/3 and trunc(sysdate) + 2/3
...it means, "
1) start with the current date/time ("sysdate")
2) cut of the time component ("trunc(sysdate)"), yielding midnight ("00:00") at the beginning of today.
3) subtract 1/3 of day ("8 hours") from midnight, yielding "midnight minus 8 hours", yielding "1600hrs yesterday".
4) Do steps 1 & 2, above, but add 2/3 of a day ("16 hours") to midnight this morning, yielding "1600hrs today".
Very clever, that Sem/Dima, huh.
![[santa] [santa] [santa]](/data/assets/smilies/santa.gif)
Mufasa
(aka Dave of Sandy, Utah, USA)
Do you use
Oracle and live or work in
Utah, USA?
Then click here to join
Utah Oracle Users Group on Tek-Tips.