Can someone explain where the highest precision numbers in variables d4 to d7 came from?
The SAS program:
data foo;
format d1-d7 datetime30.6;
timestring = "23:59:59.997000000";
time = input(timestring,time18.);
d1 = dhms(0,0,0,time);
d2 = dhms('08DEC1981'd,0,0,time);
d3 = dhms('31DEC2503'd,0,0,time);
d4 = dhms('31DEC2504'd,0,0,time);
d5 = dhms('08DEC2981'd,0,0,time);
d6 = dhms('08DEC4981'd,0,0,time);
d7 = dhms('08DEC9999'd,0,0,time);
run;
proc print;run;
The output:
Obs d1 d2 d3
1 01JAN1960:23:59:59.997000 08DEC1981:23:59:59.997000 31DEC2503:23:59:59.997000
Obs d4 d5 d6
1 31DEC2504:23:59:59.997002 08DEC2981:23:59:59.997002 08DEC4981:23:59:59.996994
Obs d7 timestring time
1 08DEC9999:23:59:59.997009 23:59:59.997000000 86400.00