DATA Step, Macro, Functions and more

SAVASTATA macro format DateTime variable for Stata?

Reply
Frequent Contributor
Posts: 78

SAVASTATA macro format DateTime variable for Stata?

Does anyone know how to save a formatted datetime variable for Stata using the SAVASTATA macro?

I have no problem with date variables.

I don't see that format in the program, but I might be overlooking it.

Or if someone knows another way to convert a SAS dataset into Stata with formats, I would be very grateful!
Trusted Advisor
Posts: 2,115

Re: SAVASTATA macro format DateTime variable for Stata?

Try PROC EXPORT. STATA support was added in SAS 9.1.3 and enhanced in 9.2.
Frequent Contributor
Posts: 78

Re: SAVASTATA macro format DateTime variable for Stata?

Thanks for your suggestion, but it doesn't work for me in SAS 9.1. It says DBMS=DTA not valid for export.
Ask a Question
Discussion stats
  • 2 replies
  • 145 views
  • 0 likes
  • 2 in conversation