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.
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.
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.