Returns the number of days between two dates after computing the difference between the dates according to specified day count conventions.
Category: | Date and Time |
Returned data type: | INTEGER |
specifies a SAS date value that identifies the starting date.
Data type | DATE |
Tip | If sdate falls at the end of a month, then SAS treats the date as if it were the last day of a 30-day month. |
specifies a SAS date value that identifies the ending date.
Data type | DATE |
Tip | If edate falls at the end of a month, then SAS treats the date as if it were the last day of a 30-day month. |
specifies a character string that represents the day count basis. The following values for basis are valid:
specifies a 30-day month and a 360-day year, regardless of the actual number of calendar days in a month or year.
Alias | '360' |
uses the actual number of days between dates. Each month is considered to have the actual number of calendar days in that month, and each year is considered to have the actual number of calendar days in that year.
Alias | 'Actual' |
uses the actual number of calendar days in a particular month, and 360 days as the number of days in a year, regardless of the actual number of days in a year.
Tip | ACT/360 is used for short-term securities. |
uses the actual number of calendar days in a particular month, and 365 days as the number of days in a year, regardless of the actual number of days in a year.
Tip | ACT/365 is used for short-term securities. |
Data type | CHAR, VARCHAR |
select datdif(date'1978-10-16',date'1996-02-16', 'act/act');
select datdif(date'1978-10-16',date'1996-02-16','30/360');
6332 6240