DATA Step, Macro, Functions and more

SAS Viya Logging

Reply
Occasional Contributor
Posts: 18

SAS Viya Logging

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

if using put function its not work

 

PROC Star
Posts: 755

Re: SAS Viya Logging

[ Edited ]

Use datepart function like this

 

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

 

Super Contributor
Posts: 440

Re: SAS Viya Logging

It works for me - what code are you using?

 

data _null_;
	a='03FEB11:14:38:02'd;	
	b=put(a,date9.);
	put b=;
run;
Ask a Question
Discussion stats
  • 2 replies
  • 63 views
  • 0 likes
  • 3 in conversation