BookmarkSubscribeRSS Feed
sg_kr
Obsidian | Level 7

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?

2 REPLIES 2
RW9
Diamond | Level 26 RW9
Diamond | Level 26

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).

Reeza
Super User

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?


 

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

How to Concatenate Values

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 2 replies
  • 927 views
  • 0 likes
  • 3 in conversation