10-27-2016 06:49 PM
I would be most appreciative for any help someone could give me.
I have date values in records where the data scanning process (for some reason) includes an asterisk within the date value. The date is converted to a string when it's scanned so the asterisk is allowed. I can convert the string date to a true date but I am faced with multiple errors because of the asterisks. I've tried various iterations of tranwrd and compress but I can't seem to get it right. I think, (perhaps mistakenly), that the asterisk is being treated as a wildcard in those functions?
Alternatively I could simple exclude anything that is not a valid date since the imperfect scanning process gives me results such as:
04/2 /90 9
Thanks for any help you might be able to provide.
10-27-2016 07:20 PM
Thank you for the response but it doesn't work. It could be I have something else going on here. Here is what I used:
temp_date = compress(date,'*');
surveydate = input(temp_date,mmddyy10.);
And here is what I got back:
NOTE: Invalid argument to function INPUT at line 24 column 15.
month=June2009 idnumber=111111111 date=06/04/* 77
10-27-2016 10:32 PM
Look very closely at @Astounding code sample. It includes both an asterisk AND a space in the arguments to the compress function.
If you modify your compress function it will work.
If you look at the error in your log closely you'll see the extra space (red underscore here).
Need further help from the community? Please ask a new question.