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?
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.