JULIAN_DAY

Returns an integer value representing a number of days from January 1, 4712 B.C. (the start of the Julian date calendar) to the date specified in the argument. The argument must be a date, a timestamp, or a valid character string representation of a date or timestamp.

Example:

Using sample table DSN8710.EMP, return the Julian day of the day that Christine Haas (EMPNO = '000010') was employed (HIREDATE = '1965-01-01').

       SELECT JULIAN_DAY(HIREDATE)
         FROM EMPLOYEE
         WHERE EMPNO = '000010'

The result is that JDAY is set to 2438762.