I’ve posted a couple of articles recently about the INTNX and INTCK functions for dealing with date/time/datetime manipulation. Whilst researching these I stumbled across some related functions that I’d not heard of before. These functions manipulate date/time/datetime values around seasonal cycles (i.e. days within weeks, months within years, etc.) and provide other useful facilities.
Seasonal Cycles
INTSEAS | Returns the length of the seasonal cycle when a date, time, or datetime interval is specified. |
INTCINDEX | Returns the cycle index when a date, time, or datetime interval and value are specified. |
INTCYCLE | Returns the date, time, or datetime interval at the next higher seasonal cycle when a date, time, or datetime interval is specified. |
INTINDEX | Returns the seasonal index when a date, time, or datetime interval and value are specified. |
Other Useful Date Functions
INTFIT | Returns a time interval that is aligned between two dates. |
INTFMT | Returns a recommended SAS format when a date, time, or datetime interval is specified. |
INTGET | Returns a time interval based on three date or datetime values. |
INTSHIFT | Returns the shift interval that corresponds to the base interval. |
INTTEST | Returns 1 if a time interval is valid, and returns 0 if a time interval is invalid. |
They’re the kind of functions that are life-savers to some, and of little or no interest to others. If you’re in the former category and you’ve not heard of them before, then I’m glad to have been of service!…