LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (July 2006, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Mon, 17 Jul 2006 21:26:40 -0400
Reply-To:     "Howard Schreier <hs AT dc-sug DOT org>" <nospam@HOWLES.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         "Howard Schreier <hs AT dc-sug DOT org>" <nospam@HOWLES.COM>
Subject:      Re: I hate date mainpulation

On Sat, 15 Jul 2006 10:34:15 -0400, Heman Hunters <hemanhunters@GMAIL.COM> wrote:

>So... I have a variable, a numeric, which symbolizes the year and the >month on the form yymm. NB that this is not a date variable, but a numeric >best12. This means that year-months like 0101 (2001jan) are represented as >101. 1998jun however is represented as 9806. > >I want to take this variable, compare it to today's date, and figure out >how many months that differ between the variable and today. PLEASE help >me, I have been trying for an hour now, I just don't get it right...

If you used SAS dates, consistently, and not unsupported conventions like the one you describe for year and month, you might find such tasks easier.

There is an extensive collection of formats, informats, and functions for use with SAS dates.

> >Thank you all!


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