Advertisement
VoronVU

Определение Високосного года

Aug 27th, 2014
617
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. SELECT
  2.   CASE
  3.     WHEN MOD(TO_NUMBER(TO_CHAR(TO_DATE('02.01.1600','DD.MM.YYYY'),'YYYY')),4) = 0
  4.      AND MOD(TO_NUMBER(TO_CHAR(TO_DATE('02.01.1600','DD.MM.YYYY'),'YYYY')),100) = 0
  5.      AND MOD(TO_NUMBER(TO_CHAR(TO_DATE('02.01.1600','DD.MM.YYYY'),'YYYY')),400) = 0 THEN 366
  6.     ELSE 365
  7.   END
  8. FROM DUAL d
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement