Date: Mon, 27 Mar 2000 14:25:48 -0700
Reply-To: Jack Hamilton <JackHamilton@FIRSTHEALTH.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Jack Hamilton <JackHamilton@FIRSTHEALTH.COM>
Subject: Re: one more thing
Content-Type: text/plain; charset=us-ascii
Try the INTNX function.
Or use a time constant.
----------
15 data _null_;
16
17 base = datetime();
18
19 before = base - '00:10:00't;
20 after = base + '00:10:00't;
21
22 xyz = intnx('minutes', base, 10);
23
24 format base before after xyz datetime.;
25
26 put base= / before= / after= / xyz=;
27
28 run;
BASE=27MAR00:13:24:16
BEFORE=27MAR00:13:14:16
AFTER=27MAR00:13:34:16
XYZ=27MAR00:13:34:00
NOTE: The DATA statement used 0.08 seconds.
----------
--
JackHamilton@FirstHealth.com
Development Manager, Technical Group
METRICS Department, First Health
West Sacramento, California USA
>>> "Ruben J. Kovalcik" <rjk2@CET.NAU.EDU> 03/27/2000 12:53 pm >>>
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
|