DATEJUL Function

Converts a Julian date to a SAS date value.

Category: Date and Time

Syntax

DATEJUL(julian-date)

Required Argument

julian-date

specifies a SAS numeric expression that represents a Julian date. A Julian date in SAS 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).

Example

The following SAS statements produce these results:
SAS Statement
Result
Xstart=datejul(94365);
put Xstart / Xstart date9.;
 
12783
31DEC1994
Xend=datejul(2001001);
put Xend / Xend date9.;
 
14976
01JAN2001

See Also

Functions: