In SPSS, a date is the number of seconds since the year 1582. These are huge numbers but they are still *just numbers* like somebody’s weight in kilos or the number of cars in some household. The main difference between dates and other variables is that SPSS *displays* dates with slashes or dots as in “2016/11/07”.

Once you fully realize this, you'll also realize that SPSS date calculations are **just as simple as any other calculations**. The main challenge, converting normal dates into numbers of seconds, is taken care of by simple date functions such as DATEDIFF (number of time units such as days between dates) or DATESUM (add time units such as years to some date).

Study the first two tutorials below and you'll work with SPSS date variables **fast, precisely and confidently**. Enjoy!

## This tutorial has 3 comments

## By Amy on July 3rd, 2018

Thanks Ruben! Helpful stuff - you really are a bit of an SPSS guru ;)

## By Ruben Geert van den Berg on June 20th, 2018

Hi Amy!

If you'd like to RECODE a date variable, you could do so by recoding the underlying numbers which you'll see after running something like

FORMATS mydate(f16).

However, the more likely solution for this is using DATE.DMY combined with IF as in

IF(mydate > DATE.DMY(1,1,2018)) outputvariable = ....

For recoding date

ranges, try IF with RANGE with DATE.DMY.Hope that helps!

## By Amy on June 20th, 2018

14th October 1582 is the exact timepoint that SPSS uses to calculate it's date in seconds from. Just in case anyone wants to recode a date variable using syntax. You will need this date.