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 (August 2008, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Tue, 19 Aug 2008 08:41:26 -0500
Reply-To:   Robin R High <rhigh@UNMC.EDU>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   Robin R High <rhigh@UNMC.EDU>
Subject:   Re: how to convert char variables into a date format?
Comments:   To: n <nikhil.abhyankar@GMAIL.COM>
In-Reply-To:   <>
Content-Type:   text/plain; charset="US-ASCII"

The ANYDTDTE function comes in handy here as well as situations with other character date variables:


09-Apr-07 09/Apr/08 09/Apr/08 Apr08 04092008 20080409

_date=input(date,ANYDTDTE11.); format _date mmddyy10.; * assign date format of your choice;

date _date

09-Apr-07 04/09/2007 09/Apr/08 04/09/2008 09/Apr/08 04/09/2008 Apr08 04/01/2008 04092008 04/09/2008 20080409 04/09/2008

Robin High UNMC

n <nikhil.abhyankar@GMAIL.COM> Sent by: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU> 08/19/2008 01:26 AM Please respond to n <nikhil.abhyankar@GMAIL.COM>


Subject how to convert char variables into a date format?

Hi all;

I have a char9 variable which actually holds dates like, 09-Apr-07.

I get an error, The informat $DATE was not found or could not be loaded. when I try using,

data want; set have; informat date DATE7. ; run;

Could anybody please tell me what is going wrong and how could I change the informat of the char type variable to a date informat?

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