i want to seperate the date and time and finally i want only time format how can i do..
eg; 08SEP09:15:50:02
This should give you what you want
data _null_;
format datebit date9. timebit time.;
dtime='08SEP09:15:50:02'dt;
datebit=datepart(dtime);
timebit=timepart(dtime);
put datebit=;
put timebit=;
run;
thank you...chrisbook
how can i convert the time eg...09:30
and this time will be concat to date . if this is correct time format to concat please explain.
And what format is the data in? Is it datetime or text? This is where providing test data in the form of a datastep and what the required output should look like really helps. If its datetime then use the datepart/timepart functions. If its text, then use substr and input.
thank you...Rw9
how can i convert the time eg...09:30
and this time will be concat to date . if this is correct time format to concat please explain.
I am sorry, I have no idea what you are talking about. Have a look at some of the other questions posted here for guidance on how to ask a question which provides all the information needed to give an answer, for example:
Note the test data datastep and what the output should look like.
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
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.