LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous (more recent) messageNext (less recent) messagePrevious (more recent) in topicNext (less recent) in topicPrevious (more recent) by same authorNext (less recent) by same authorPrevious page (March 2000, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
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
Comments: To: rjk2@CET.NAU.EDU
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


Back to: Top of message | Previous page | Main SAS-L page