BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Vijay77
Fluorite | Level 6

Hi There,

           i have a date variable in below format how to convert it to ISO 8601 date format

 

B_date

22AUG19:18:39:28
31AUG19:08:42:53
09SEP19:19:21:23

 

1 ACCEPTED SOLUTION

Accepted Solutions
ed_sas_member
Meteorite | Level 14

Hi @Vijay77 

 

Something like this ?

 

data;
	input B_date:datetime16.;
	format B_date E8601DT.;
	datalines;
22AUG19:18:39:28
31AUG19:08:42:53
09SEP19:19:21:23
;
run;

Capture d’écran 2019-12-17 à 12.30.32.png

 

https://documentation.sas.com/?docsetId=leforinforref&docsetTarget=p0jd9jaqmxd2ezn1kncmpgfqcpiz.htm&...

 

View solution in original post

3 REPLIES 3
ed_sas_member
Meteorite | Level 14

Hi @Vijay77 

 

Something like this ?

 

data;
	input B_date:datetime16.;
	format B_date E8601DT.;
	datalines;
22AUG19:18:39:28
31AUG19:08:42:53
09SEP19:19:21:23
;
run;

Capture d’écran 2019-12-17 à 12.30.32.png

 

https://documentation.sas.com/?docsetId=leforinforref&docsetTarget=p0jd9jaqmxd2ezn1kncmpgfqcpiz.htm&...

 

Vijay77
Fluorite | Level 6

need to create a new variable C_date and add B_date Values to C_date variable

ed_sas_member
Meteorite | Level 14

Hi @Vijay77 

 

Could you please clarify your request by providing sample data and desired output?

Thank you! 

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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
  • 3 replies
  • 714 views
  • 1 like
  • 2 in conversation