New functions for dates and times

Stata 17 has added new convenience functions for handling dates and times in both Stata and Mata. The new functions can be grouped into three categories:

  1. Datetime durations: functions that are designed to get durations, such as ages (see [D] Datetime durations).
  2. Relative dates: functions that return dates based on other dates, such as the next birthday relative to a given date (see [D] Datetime relative dates).
  3. Datetime components: functions that extract different components from datetime values (see [D] Datetime).

The new functions factor in leap years, leap days, and leap seconds, wherever applicable. Leap seconds are one-second adjustments that are occasionally applied to Coordinated Universal Time (UTC).

Post your comment

Timberlake Consultants