I have dates in the following form: jjjmm (200405, 200602,...). I have 12.000 variables and the dates vary from 199907 - 200612. I was wondering how to 'transform' these dates into the Sas-format, that allows me to calculate with the date? (I want to calculte the average time).
I have seen a few examples, but I was wondering how I can do this for all the different dates (and not for one specific date).
This is a solution for cases when your date is a numberical variable and character variable:
YourDate=200405; YourDat="200405"; output;
YourDate=200602; YourDat="200602"; output;
format date date7.;
format dat date7.;
Message was edited by: SPR