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 (December 2001, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Mon, 10 Dec 2001 12:06:08 -0500
Reply-To:   "Chakravarthy, Venky" <Venky.Chakravarthy@PFIZER.COM>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   "Chakravarthy, Venky" <Venky.Chakravarthy@PFIZER.COM>
Subject:   Re: sas dates
Comments:   To: "Kaskey, Larry" <LKaskey@SEISINT.COM>
Content-Type:   text/plain; charset="iso-8859-1"

Larry,

When you assign year values with leading zeroes, the date INFORMAT reads it as two year digits. So you are in effect reading in a two digit year value. The YEARCUTOFF system option is used to assign the century. So, what you have observed is not a bug.

See v6 documentation or SAS Note V6-INFORMATS-0573 for more on this:

Venky #****************************************# # E-mail: venky.chakravarthy@pfizer.com # # swovcc@hotmail.com # # Phone: (734) 622-1963 # #****************************************#

-----Original Message----- From: Kaskey, Larry [mailto:LKaskey@SEISINT.COM] Sent: Monday, December 10, 2001 10:43 AM To: SAS-L@LISTSERV.UGA.EDU Subject: sas dates

I am trying to check for invalid dates...here is my code...

data _null_; file print; length dob $10; infile 'h:\data_cleanse\test_file.txt' dlm='*' missover dsd; input dob $ dob2 = input(dob,mmddyy10.); if dob = . then put dob= dob2=; run;

Now, I put in as the first date a year of 0000...so the first record's date looks like this....'07/16/0000' I expected this to be invalid, but instead, SAS appears to interpret this as 07/16/2000 and converts it to the sas date 14807...I have a feeling this is something that most people here are aware of, but if someone can provide an explanation or a way for me to test for invalid dates of this nature, I would greatly appreciate it.

Thanks,

Larry Kaskey ETL Developer Seisint,Inc 561-999-4597


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