Date: Mon, 27 Mar 2000 22:27:37 GMT
Reply-To: "Daniel J. Nordlund" <dnordlund@AOL.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: "Daniel J. Nordlund" <dnordlund@AOL.COM>
Organization: AOL http://www.aol.com
Subject: Re: one more thing
Ruben J. Kovalcik <rjk2@cet.nau.edu> wrote:
>Hello again. I have another novice question about time intervals i calculate
>my time intervals like this:
>sas_beg1=hms(int(beg_tim1/100),mod(beg_tim1,100),0);
>sas_end1=hms(int(end_tim1/100),mod(end_tim1,100),0);
>dur_min1=intck("min",sas_beg1,sas_end1);
>
>however, i am trying to subtract 10 minutes from sas_beg1 and add ten
>minutes to sas_end1. I have tried several different things to modify my
>above code but this doesn't work well. Any ideas? Ruben
>
Reuben,
your SAS time variables are equal to the number of seconds since midnight. As
long as you are not crossing a midnight boundary, it is as simple as
subtracting or adding 600 (10 min=10 * 60 sec) to your variables.
Hope this helps,
Dan Nordlund
|