Scott
does the MDY() function handle changing the day when adding or subtracting 10 from the year value for a 29-Feb date?
This SASlog snip shows a simple demo of the problem is see with the MDY() approach[pre]203 %put %sysfunc( mdy( 2,29,2008), date9 );
29FEB2008
204 %put %sysfunc( mdy( 2,29,2018), date9 );
WARNING: An argument to the function MDY referenced by the %SYSFUNC or %QSYSFUNC macro function is out of range.
NOTE: Mathematical operations could not be performed during %SYSFUNC function execution. The result of the operations have been set to a missing value.
[/pre]
Adapting the number of milliseconds works, until adding 10 years, an interval which can have 2 or 3 leap days. Some help comes from the SAMEDAY parameter of the INTNX() function for interval handling.
However, I assume/hope the system, from which these milisecond timestamps come, will have defined the way it handles leap days.
or do I just mis-understand ~ should we just add the (constant) number of days or milliseconds between base-dates for SAS (1Jan1960) and the other system (1Jan1970)?
PeterC
doh'
so that was what you were suggesting with mdy(1,1,1970) !
ahhhh
Message was edited by: Peter_c