SAS date to Excel General format

Reply
Highlighted
New Contributor
Posts: 2

SAS date to Excel General format

I have the following date in my SAS program.

 

201707

 

In YYMMN6. format, (numeric data).

 

I need to export it into Excel in the same configuration 201707, but as a general format, as in ... not a date, just a number.

 

Any ideas on how to approach this?

Super User
Posts: 23,980

Re: SAS date to Excel General format

[ Edited ]

@debw16 wrote:

I have the following date in my SAS program.

 

201707

 

In YYMMN6. format, (numeric data).

 

I need to export it into Excel in the same configuration 201707, but as a general format, as in ... not a date, just a number.

 

Any ideas on how to approach this?



Use ODS EXCEL with TAGATTR. 

 

Page 7 here: 

https://support.sas.com/resources/papers/proceedings16/SAS5642-2016.pdf

 

Another option is is to create a text variable and that will look correct, but a user would have to convert it. 

 

 

New Contributor
Posts: 2

Re: SAS date to Excel General format

Thanks Reeza, I'll check this out soon and see if I can find something that works.

Ask a Question
Discussion stats
  • 2 replies
  • 82 views
  • 0 likes
  • 2 in conversation