JULIAN_TO_GREGORIAN_DATE_UDF

Definition

This user-defined function (UDF) is used to transform a Julian date into the formats: JD Edwards, YYYYDDD (astronomical), and YYYYDDD (ordinal).

JULIAN_TO_GREGORIAN_DATE_UDF(JULIAN_DATE CHAR(7), FORMAT_SELECTED CHAR(1))

Parameters

JULIAN_DATE CHAR

The Julian date to transform.

FORMAT_SELECTED CHAR

The format required for the logic. E.g. 'E', 'J', 'R'. Astronomy standardized or 'J' is the default format.

Returns

Returns a variant with the date representation of the Julian date.

Usage example

Input:

SELECT JULIAN_TO_GREGORIAN_DATE_UDF('098185');

Output:

'1998-07-04' --(a.k.a Sat Jul 04 1998)

Last updated