Hi, Nothing wrong is here. The first argument to the putn function should be a number: %let perftestmonth=02/01/2012; %put %sysfunc(putn(%sysfunc(inputn(&perftestmonth,ddmmyy10.)),datetime21.2)); The numeric value of 01/01/2012 is 18993. The DATETIME format requires a timestamp precision numbers. The increment unit is 'second', not 'day'. Try this: data dates; date0_18993 = putn(18993,'datetime'); date0_0 = input('01JAN1960:00:00:00', datetime.); date0_1 = input('01JAN1960:00:00:01', datetime.); date1_0 = input('02JAN1960:00:00:00', datetime.); sec_in_1day = 60*60*24; run;
... View more