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 (July 2010, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Thu, 22 Jul 2010 18:36:15 -0400
Reply-To:     Nat Wooding <nathani@VERIZON.NET>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Nat Wooding <nathani@VERIZON.NET>
Subject:      Re: Out of Sequence Date Report
Comments: To: David Friedman <harrypotterdhf@EARTHLINK.NET>
In-Reply-To:  <201007222205.o6MGRSKl016735@willow.cc.uga.edu>
Content-Type: text/plain; charset="utf-8"

David

After I hit send, it occurred to me that my method will fail if we have a seqequence such as the first but two of the dates are reversed. In this case, the dates are out of order by my method will not detect such. Is this a potential issue. If so, we will need an array to test the time interval between the dates.

Nat

-----Original Message----- From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of David Friedman Sent: Thursday, July 22, 2010 6:05 PM To: SAS-L@LISTSERV.UGA.EDU Subject: Out of Sequence Date Report

I have a series of dates for each ID. The 2nd date (date minus 1) is supposed to be 1 day less than the 1st date. The 3rd date (date minus 2) is supposed to be 1 day less then the 2nd date (date minus 1) and so forth. I wish to produce a report showing either the sequence is OK, out of sequence, or a missing date(s). For example for ID # 4 date minus 2 should be 1 day less than date minus 1 which would be 06/23/10 but instead it is 07/01/10 which is an error. For ID #2 07/28/09 is 3 days less then 07/31/09 instead of 1 day. The out of sequence condition would be flagged for the first occurrence of paired out of sequence dates and the whole row would be displayed as ID’s 2 and 4 below. Likewise the whole row would be flagged as missing date if it had a least 1 missing date. What would be the easiest way to do this?

ID Date (Date minus 1) (Date minus 2) (Date minus 3) (Date minus 4) Type

1 05/07/10 05/06/10 05/05/10 05/04/10 05/03/10 date sequence OK 2 08/01/09 07/31/09 07/28/09 07/27/09 08/24/09 out of sequence 3 06/05/10 . . . 05/01/10 missing date 4 06/25/10 06/24/10 07/01/10 06/30/10 07/01/10 out of sequence


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