Mar 25, 2012 #1 proximo20 Technical User Joined Sep 29, 2009 Messages 22 Location 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.
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.
Mar 26, 2012 #2 sasbuddy Programmer Joined May 10, 2011 Messages 38 Location US 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 http://sites.google.com/site/sasbuddy/ Upvote 0 Downvote
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 http://sites.google.com/site/sasbuddy/
Mar 26, 2012 Thread starter #3 proximo20 Technical User Joined Sep 29, 2009 Messages 22 Location US 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. Upvote 0 Downvote
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.
Mar 26, 2012 #4 sasbuddy Programmer Joined May 10, 2011 Messages 38 Location US Request you to make sure that you use appropriate variables names. This should work. sasbuddy http://sites.google.com/site/sasbuddy/ Upvote 0 Downvote
Request you to make sure that you use appropriate variables names. This should work. sasbuddy http://sites.google.com/site/sasbuddy/