hi
I have a file that has dob dates coming in with char formats as 12/31/1977 and 1914-07-15. Same field different formats. How do i make them in the same format coming in as char in the end?
Thank you
You shouldn't store as char because you can't do calculations on a char date variables, but try anydtdte as your informat. If you really want it as a char you can convert it.
I am with @LinusH here, the problem lies with your data supplier. You will of course have a data import agreement setup which defines the structure, content of the data yes? If not, then whatever you code may need to change next time you get data, I mean wht if the vendor decides to drop that field, or add a field, or change them all to DDMONYYYY? The control and specification is all in the documentation, programming is more or less irrelevant.
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
Still thinking about your presentation idea? The submission deadline has been extended to Friday, Nov. 14, at 11:59 p.m. ET.
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.