Previous Page | Next Page

Language Reference

Date and Time Functions

DATDIF

returns the number of days between two dates

DATE

returns the current date as a SAS date value

DATEJUL

converts a Julian date to a SAS date value

DATEPART

extracts the date from a SAS datetime value

DATETIME

returns the current date and time of day as a SAS datetime value

DAY

returns the day of the month from a SAS date value

DHMS

returns a SAS datetime value from date, hour, minute, and seconds

HMS

returns a SAS time value from hour, minute, and seconds

HOUR

returns the hour from a SAS time or datetime value

INTCK

returns the integer number of time intervals in a given time span

INTNX

advances a date, time, or datetime value by a given interval, and returns a date, time, or datetime value

JULDATE

returns the Julian date from a SAS date value

JULDATE7

returns a seven-digit Julian date from a SAS date value

MDY

returns a SAS date value from month, day, and year values

MINUTE

returns the minute from a SAS time or datetime value

MONTH

returns the month from a SAS date value

QTR

returns the quarter of the year from a SAS date value

SECOND

returns the second from a SAS time or datetime value

TIME

returns the current time of day

TIMEPART

extracts a time value from a SAS datetime value

TODAY

returns the current date as a SAS date value

WEEKDAY

returns the day of the week from a SAS date value

YEAR

returns the year from a SAS date value

YRDIF

returns the difference in years between two dates

YYQ

returns a SAS date value from the year and quarter

Previous Page | Next Page | Top of Page