Date: Fri, 22 Aug 2003 13:59:14 -0400
Reply-To: Howard Schreier <Howard_Schreier@ITA.DOC.GOV>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Howard Schreier <Howard_Schreier@ITA.DOC.GOV>
Subject: Re: import of the .txt file with time values
I don't think you can do it all in the INPUT statement. Try something like
this:
input (hour minute second)(2.);
time = hms(hour,minute,second);
This depends on the subfields being aligned, even when there is a one-digit
hour. If that does not hold, it gets messier.
On Thu, 21 Aug 2003 18:51:16 +0000, Peter Smith <peter@SMITH.COM> wrote:
>Hi all,
>
>I have .txt file of the following content
>140525
> 90832
>150854
>...etc...
>These are the daytime values, where the last two digits of each row are
>seconds (from 01 to 60), next two - minutes (01 to 60) and the first _one_
>(1 to 9) or _two_ (10 to 24) digits are hours. I need to import this file
>into SAS. How can I tell SAS to recognize time format of the input?
>
>SAS v. 8.2. (WinNT)
>
>Thanks in advance.
>
>Peter
|