Date variable: from String to Numeric with a date format

year=substr(DateOfService,1,4)+0;
D=substr(DateOfService,6,5);
x=indexc(D,"/")-1;
x2=indexc(D,"/")+1;
month=substr(D,1,x)+0;
day=substr(D,x2,2)+0;
s_date=MDY(month,day,year);

FORMAT date date9. ;

Leave a Reply