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