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 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


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