Hi all,
I want to know how to rewrite this better, because I know there must be. I tried enumerations but failed?
I get the month from readline in file and have to convert it to 01,02 etc.
month := leftstr(rightstr(A[8],8),3);
if (month = 'Jan') then
monthnr = '01'
else if (month = 'Feb') then
monthnr = '02'
else if (month = 'Mar') then
monthnr = '03'
else if (month = 'Apr') then
monthnr = '04';
thanks
I want to know how to rewrite this better, because I know there must be. I tried enumerations but failed?
I get the month from readline in file and have to convert it to 01,02 etc.
month := leftstr(rightstr(A[8],8),3);
if (month = 'Jan') then
monthnr = '01'
else if (month = 'Feb') then
monthnr = '02'
else if (month = 'Mar') then
monthnr = '03'
else if (month = 'Apr') then
monthnr = '04';
thanks