Skip to content

Instantly share code, notes, and snippets.

@ythalorossy
Created May 8, 2018 14:38
Show Gist options
  • Save ythalorossy/3fa1d934654d63a0cecbd2f15c9c38cb to your computer and use it in GitHub Desktop.
Save ythalorossy/3fa1d934654d63a0cecbd2f15c9c38cb to your computer and use it in GitHub Desktop.
SELECT
SYSDATE,
TRUNC (SYSDATE) as truncated, -- truncate to 12:00AM
TRUNC (SYSDATE) + 17/24 as t_5PM, -- 5PM
SYSDATE + (60 * 5) / 1440 AS t_5h, -- Plus 5 hours in the current time
NEXT_DAY(TRUNC(SYSDATE),'FRIDAY') "NEXT DAY" -- Next friday 12AM
FROM DUAL;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment