I need to find minimum of two dates. I know I can use min function. q.what precautions do I need to follow? Ex min(d1,d2) q.d1,d2 should be in same format? Here is the requirement. proc sql; create table l1 select termdate format=datetime21. from t1; quit; proc sql; select min(today()-1,termdate) as testdate format=datetime21. from l1,l2; where l1.id=l2.id; quit; termdate output testdate 1) 31DEC9999:00:00:00 20FEB2012 2) 30APR2006:00:00:00 20FEB2012 Q) here there are no errors. But for two different termdate inputs I am getting the same output?
... View more