Hello,
I have a large dataset with one or few observations that has date shown as asterisks (as in the attached image). I wonder how should I remove them? The date format is YYMMDD8.
I've read this thread, Why are my dates showing up as asterisks?, which recommend transforming date into Excel date format before importing. But my dataset is too large for Excel.
Edit:
Based on suggestions of answerers, I print out the date with BEST32 and it shows following results. Apparently it is way too large for date, so I managed to remove them by setting a threshold. It's not a good idea to "hard code" a range because I have no idea on future ranges, so I'm still open to any other solutions available. Thank you for your help!
Almost certainly .....
The asterisks are showing up because the values for these variables are too large. The values won't fit into the YYMMDD8. format.
Can't tell from this vantage point what is actually in these variables or how it got there. Can only tell that it's bad data.
If you switch the format to something wider, you might be able to get an idea of what is there. You could try a format like date10. or yymmdd11.
But you would only discover what the values actually look like and might not solve the riddle of how the bad data got there.
Almost certainly .....
The asterisks are showing up because the values for these variables are too large. The values won't fit into the YYMMDD8. format.
Can't tell from this vantage point what is actually in these variables or how it got there. Can only tell that it's bad data.
If you switch the format to something wider, you might be able to get an idea of what is there. You could try a format like date10. or yymmdd11.
But you would only discover what the values actually look like and might not solve the riddle of how the bad data got there.
Can you print those values with a best32. format and show us the result?
Or change the format temporarily in the table and show use what a best32 reveals.
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.