Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

DATE_OF_JULIAN_DAY() - Convert Julian day number

Function group: time function

DATE_OF_JULIAN_DAY() returns the corresponding date in the Gregorian calendar for a given Julian day number (see also the inverse function JULIAN_DAY_OF_DATE() on "JULIAN_DAY_OF_DATE() - Convert date").

The Julian day number of a date is the number of days which have passed since the 24th November, 4714 BC (in accordance with the Gregorian calendar).

DATE_OF_JULIAN_DAY() and JULIAN_DAY_OF_DATE() are inverse functions. When, for example, a constraint exists in the form JULIAN_DAY_OF_DATE( column) < :user_variable, the SQL Optimizer can then convert this constraint internally to the constraint column < DATE_OF_JULIAN_DAY( :user_variable) in order to permit the use of indexes on column. Consequently :user_variable may only contain values which are permitted as an argument of DATE_OF_JULIAN_DAY(). This also applies for any constant expressions in place of :user_variable.



DATE_OF_JULIAN_DAY ( expression )



expression

Numeric integer expression. Its value represents the number of days which have passed since the 24th November 4714 B.C. Its value must lie between 1721426 and 5373484.
expression may not be a multiple value with dimension > 1.


Result

When expression returns the NULL value, the result is the NULL value.

Otherwise:

SESAM/SQL interprets the value of expression as a Julian day number. The result of the function is the date which corresponds to this Julian day number.


Data type: DATE


Example

DATE_OF_JULIAN_DAY (2451545)

2000-01-01