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! 

CFC_SAS_Communities_400x225.jpg

Call for content now open!

It's your turn to help shape SAS Innovate 2027. Share your expertise and inspire the SAS community.

Submit your proposal →

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