BookmarkSubscribeRSS Feed
Aswanth
Calcite | Level 5

how to change 03FEB11:14:38:02 time format to date9.

if using put function its not work

 

2 REPLIES 2
PeterClemmensen
Tourmaline | Level 20

Use datepart function like this

 

data _null_;
	dt = '03FEB11:14:38:02'dt;
	date = datepart(dt);
	put date;
	format date date9.;
run;

 

ChrisBrooks
Ammonite | Level 13

It works for me - what code are you using?

 

data _null_;
	a='03FEB11:14:38:02'd;	
	b=put(a,date9.);
	put b=;
run;

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

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.

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
  • 2 replies
  • 591 views
  • 0 likes
  • 3 in conversation