JULDATE7 Function

Returns a seven-digit Julian date from a SAS date value.

Category: Date and Time
Returned data type: DOUBLE

Syntax

JULDATE7(date)

Arguments

date

specifies any valid expression that represents a SAS date value.

Data type DOUBLE
See <sql-expression>
FedSQL Expressions

Details

A SAS date value is a number that represents the number of days from January 1, 1960 to a specific date. The JULDATE7 function returns a seven-digit Julian date from a SAS date value. The first four digits represent the year, and the next three digits represent the day of the year.
For more information about how FedSQL handles dates, see Dates and Times in FedSQL.

Comparisons

The function JULDATE7 is similar to JULDATE except that JULDATE7 always returns a four-digit year. Thus, JULDATE7 is year 2000 compliant because it eliminates the need to consider the implications of a two-digit year.

Example

The following statements illustrate the JULDATE7 function:
Statements
Results
select juldate7(mdy(12,31,2006));
2007365
select juldate7(mdy(12,31,2016));
2016366

See Also

Functions:
Last updated: February 23, 2017