BookmarkSubscribeRSS Feed
KalaBhairava
Quartz | Level 8

HI All,

 

I have dates like   2017-10-05T13:00 in $22 format i want to convert it in to CDISC is860 format how i can...?

5 REPLIES 5
PaigeMiller
Diamond | Level 26

You probably have to read it in using one of the ANYDTDTM formats to make it a numeric.

http://documentation.sas.com/?docsetId=leforinforref&docsetTarget=p1hsn1ji141r4zn0z3xm2dthop6a.htm&d...

 

Then, all you have to do is apply the desired format ISO 8601 format

http://documentation.sas.com/?docsetId=leforinforref&docsetTarget=p1a0qt18rxydrkn1b0rtdfh2t8zs.htm&d...

--
Paige Miller
Jagadishkatam
Amethyst | Level 16
Isn't the date 2017-10-05T13:00 in CDISC IS8601 format. This is the format. You want to convert this into a numeric format. Please confirm in which format you want to convert this date. So we could suggest.
Thanks,
Jag
KalaBhairava
Quartz | Level 8

Yes I want to convert it into numeric ,presently it in $20. format I want to present it in E8601DT19.

Jagadishkatam
Amethyst | Level 16
   data _null_; 
     length x $22 ; 
     x='2017-10-05T13:00'; 
     value=input(x,e8601dt19.); 
     put value=datetime19.;
run;
Thanks,
Jag

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

Register Now

How to Concatenate Values

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 5 replies
  • 1718 views
  • 0 likes
  • 4 in conversation