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 |

specifies a SAS date value that identifies the starting 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.

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.

A security that pays
interest on the last day of a month will either always make its interest
payments on the last day of the month, or it will always make its
payments on the numerically same day of a month, unless that day is
not a valid day of the month, such as February 30. For more information,
see Method of Calculation for Day Count Basis (30/360) .

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. |

The DATDIF function
has a specific meaning in the securities industry, and the method
of calculation is not the same as the actual day count method. Calculations
can use months and years that contain the actual number of days. Calculations
can also be based on a 30-day month or a 360-day year. For more information
about standard securities calculation methods, see the References
section at the bottom of this function.

In the following example,
DATDIF returns the actual number of days between two dates, as well
as the number of days based on a 30-day month and a 360-day year.

Securities Industry
Association. 1994. Standard Securities Calculation Methods - Fixed Income
Securities Formulas for Analytic Measures. Vol. 2. New
York, USA: . Securities Industry Association

Copyright © SAS Institute Inc. All rights reserved.