Date Logic

Tagessekunde, Monatssekunde…
Second of the Day, Second of the Months …

select sysdate
, TO_CHAR(SYSDATE,'HH24')*3600 AS WHOLE_HOURS_IN_S
, TO_CHAR(SYSDATE,'MI')*60 AS WHOLE_MINUTES_IN_S
, TO_CHAR(SYSDATE,'SS') AS CURRENT_SECOND
, TO_CHAR(SYSDATE,'HH24')*3600 + TO_CHAR(SYSDATE,'MI')*60 + TO_CHAR(SYSDATE,'SS') AS SECOND_OF_THE_DAY
, TO_CHAR(SYSDATE,'DD') AS WHOLE_DAY_OF_THE_MONTH
, TO_CHAR(SYSDATE,'DD') * 86400 AS SECONDS_WHOLE_DAYS_OF_MONTHS
, (TO_CHAR(SYSDATE,'DD') * 86400) + (TO_CHAR(SYSDATE,'HH24')*3600 + TO_CHAR(SYSDATE,'MI')*60 + TO_CHAR(SYSDATE,'SS')) AS SECONDS_OF_THE_MONTH
from dual;

Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert.