Export to csv date in 2014.01.24 format

Accepted Solution Solved
Reply
Super Contributor
Posts: 412
Accepted Solution

Export to csv date in 2014.01.24 format

Hello Everyone,

I have to export date data in SAS to csv file and the output format need to be YYYY.MM.DD.

I am not sure how to get i done how to get it done.

Could you please help me with that?

Thank you so much.

HHC.

data have;

input date  ;

informat date yymmdd10.;

format date date9.;

datalines;

140328

140329

;run;


Accepted Solutions
Solution
‎03-20-2014 12:36 PM
Super User
Posts: 19,815

Re: Export to csv date in 2014.01.24 format

SAS(R) 9.2 Language Reference: Dictionary, Fourth Edition

put day yymmddc5.;
 
09:05
 
put day yymmddd8.;
 
09-05-14
 
put day yymmddp10.;
 
2009.05.14
 
put day yymmddn8.;
 
20090514

View solution in original post


All Replies
Solution
‎03-20-2014 12:36 PM
Super User
Posts: 19,815

Re: Export to csv date in 2014.01.24 format

SAS(R) 9.2 Language Reference: Dictionary, Fourth Edition

put day yymmddc5.;
 
09:05
 
put day yymmddd8.;
 
09-05-14
 
put day yymmddp10.;
 
2009.05.14
 
put day yymmddn8.;
 
20090514
Super Contributor
Posts: 412

Re: Export to csv date in 2014.01.24 format

Thank you, Reeza.

HHC

🔒 This topic is solved and locked.

Need further help from the community? Please ask a new question.

Discussion stats
  • 2 replies
  • 490 views
  • 0 likes
  • 2 in conversation