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 (February 2004, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Thu, 5 Feb 2004 08:55:40 -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: convert date to sas date
Comments:   To: Doug <queanbeyan@HOTMAIL.COM>
Content-Type:   text/plain; charset="iso-8859-1"

In version 9, perhaps the ANYDT informat will let you read it in straight. For versions up to 8.2 as Harry has pointed out there is no worddatx informat. You can create your own informat though using the worddatx format:

data control ; retain fmtname "spaced" type "I" ; do label = "01jan1950"d to "31dec2049"d ; start = put(label,worddatx.-l) ; output ; end ; run ;

proc format cntlin = control ; run ;

data _null_ ; input spacedat & : spaced17. ; put spacedat= date9. ; cards ; 1 January 1990 29 February 2004 31 December 1975 30 September 2002 run ;

Kind Regards, _________________________________ Venky Chakravarthy E-mail: swovcc_AT_hotmail_DOT_com

-----Original Message----- From: Doug [mailto:queanbeyan@HOTMAIL.COM] Sent: Wednesday, February 04, 2004 10:03 PM To: SAS-L@LISTSERV.UGA.EDU Subject: convert date to sas date

Hi,

I have a dataset that has a character variable called 'Created' that has a date in the following format = 5 February 2004.

Could someone please tell me how I can change this to a sas date? I have scanned and concatenated, but there must be an easier way - like an informat?

Doug

LEGAL NOTICE Unless expressly stated otherwise, this message is confidential and may be privileged. It is intended for the addressee(s) only. Access to this E-mail by anyone else is unauthorized. If you are not an addressee, any disclosure or copying of the contents of this E-mail or any action taken (or not taken) in reliance on it is unauthorized and may be unlawful. If you are not an addressee, please inform the sender immediately.


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