Dates and times


There are three common formats across SAS, SPSS and Stata.

Date (number of days)

Time (number of seconds):

DateTime (number of seconds):


Dates and date times use a difference offset to R:


Try the haven package in your browser

Any scripts or data that you put into this service are public.

haven documentation built on April 15, 2022, 5:05 p.m.