DATEJUL Function

Converts a Julian date to a SAS date value.

Category: Date and Time
Returned data type: DOUBLE

Syntax

DATEJUL(julian-date)

Arguments

julian-date

specifies any valid expression that evaluates to a numeric value and that represents a Julian date. A Julian date is a date in the form yyddd or yyyyddd, where yy or yyyy is a two-digit or four-digit integer that represents the year and ddd is the number of the day of the year. The value of ddd must be between 1 and 365 (or 366 for a leap year).

Data type DOUBLE
See <sql-expression>
FedSQL Expressions

Details

A SAS date value is the number of days from January 1, 1960 to a specified date. The DATEJUL function returns the number of days from January 1, 1960 to the Julian date specified in julian-date.
For more information about how dates are handled in FedSQL, see Dates and Times in FedSQL.

Example

The following statements illustrate the DATEJUL function:
Statements
Results
select datejul(11365);
18992

See Also

Functions: