2012-07-11 09:43:20.55
i have used time part
it was rouging the sec based on milli seconds
i wnat the output to be
Time
------
09:43:20
Why not use the
INT function and discard the offensive decimal part.
data _null_;
input dt anydtdtm25.;
put (dt)(=datetime20.2);
nomill = int(dt);
put (nomill dt)(=datetime.);
cards;
2012-07-11 09:43:20.55
;;;;
run;
799 data _null_;
800 input dt anydtdtm25.;
801 put (dt)(=datetime20.2);
802 nomill = int(dt);
803 put (nomill dt)(=datetime.);
804 cards;
dt=11JUL12:09:43:20.55
nomill=11JUL12:09:43:20 dt=11JUL12:09:43:21
Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!
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.
Ready to level-up your skills? Choose your own adventure.