Date: Wed, 28 Aug 1996 15:22:16 -0500
Reply-To: KELLEY CROWDER SMITH <SMITHKC@OGE.COM>
Sender: "SAS(r) Discussion" <SAS-L@UGA.CC.UGA.EDU>
From: KELLEY CROWDER SMITH <SMITHKC@OGE.COM>
Subject: Question: how to add a theoretical obs for a given time value?
-Reply
Larry,
To get the datetime variable with the "00" just
DATETIME = DHMS(DATEPART(LAG1(DATETIME)),0,0,0);
Right now, I can't think of an easy way to get the rest of what you
want--maybe I will or maybe someone else will.
Kelley Smith
Team Leader - Economic Research & Forecasting
OG&E Electric Services | The servant is on the way to the
Oklahoma City, OK | dry cleaners to pick up the
smithkc@oge.com | emperor's clothes.
>>> "Larry D. Clendenen" <larryc@OKWAY.OKSTATE.EDU> 08/28/96
10:57am >>>
I have very little experience with datastep programming and I am asking
for help.
I have data based on changes in streamflow and not time.
ws flow (cfs) datetime
1 10.00 25SEP1979:22:00:00
1 14.00 26SEP1979:00:01:00
I would like to have..
1 10.00 25SEP1979:22:00:00
1 12.67 26SEP1979:00:00:00
1 14.00 26SEP1979:00:01:00
Specifically, I would like to have an additional observation at 0:00:00
time.
I need to have the change in flow from the last observation of a day to
the first observation of the next day divided by the change in time.
(sometimes positive sometimes negative) This would give average flow
per time unit that could then be multiplied by the time to or from
0:00:00 to give the theoretical average flow at 0:00:00.
I am having trouble getting started with this task. I would greatly
appreciate any pointers to the solution.
Additionally my data are in Excel as a date mmddyy8. And time in hours
and tenths of hours. I could not find an informat in SAS to handle the
tenths of hours. I had to format the time in Excel to hhmmss8. Then
infile and create the datetime20.
Advice on this would also be appreciated.
Thanks
-Larry
larryc@okway.okstate.edu