Hi ,
i have a file with date variable of different date types like date9. ,date10. & mmddyy10.
i want to import all together into one dataset with one format and informat.
can i use anydtdte here, does it work?
Try it, its what it is for, though you might be better off importing as text and applying your own set of imputation rules (i.e. we have dates as ISO - text, and numeric, and date and time in separate variables, hence we have original , parts, and imputed).
If you have mmddyy and ddmmyy it's likely to get it wrong. Hopefully you don't
Are those date types all in the same column in the same file?
If so, anydtdte is likely your best choice, but it may not be 100% accurate. Is that ok for what you're doing?
@sg_kr wrote:
Hi ,
i have a file with date variable of different date types like date9. ,date10. & mmddyy10.
i want to import all together into one dataset with one format and informat.
can i use anydtdte here, does it work?
It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.
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.