Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Time format

Status
Not open for further replies.

proximo20

Technical User
Sep 29, 2009
22
0
0
US
Time is reported like this in the data that I work on:

Time

0930
0931
0932
.
.
.

I need to convert it to

09:30:00
09:31:00
09:32:00

Thanks in advance.
 
There could be multiple ways to do it.
Considering the input variable is in character format then you can use following expressions

tm = timepart(dhms(00,substr(time,1,2),substr(time,3,2),00));
put tm =time8.;

sasbuddy
 
Thanks, but this is how the log file looks like:
time.
time.
time.
time.
time.
time.
time.
.
.
.
so I had the cancel the submitted statements.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top