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

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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