Asked • 03/18/19

converting format (from date to numeric) using SAS?

I am working with a dataset in SAS, containing many variables. One of these variables is a DATE variable and it has a date/time format. It looks like this: 12FEB97:00:00:00 27MAR97:00:00:00 14APR97:00:00:00 Now the thing is that I would like to convert this variable into a NUMERIC format. And I would like to get the following result (based on the previously shown 3 examples): 199702 199703 199704 Do you have any ideas how to do it? I already read through many docs, pdfs etc. but still could not find a proper solution yet. Thank you very much!

1 Expert Answer


Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.


Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.