date 100 year different

#1
I have a date variable in string (var_date) in the spss data file, 2 cases like these:
01-Mar-41
12-May-53

After I changed string into date variable using the syntax: alter type var_date(date10) and changed to yyyy, the 2 cases became these:
01-Mar-2041
12-May-1953

My question is: why in the first case, year became 2041 rather than 1941, however, for the second case, 1953 rather than 2053?

Thanks for your help.
 

obh

Active Member
#2
I don't work with SPSS, but I can guess ... that it takes the date which is closer to the round in the century level round(20.19)=20.00
20.00 centuries is 2000

2000-1941=59 2041-2000=41 41<59
2000-1953=47 2053-2000=53 47<53

Any way just feeds it with YYYY instead of YY. Cheers