<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Please help - converting text date to date in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Please-help-converting-text-date-to-date/m-p/9345#M620</link>
    <description>use &lt;BR /&gt;
&lt;BR /&gt;
data sasfile;                                                                                                                           &lt;BR /&gt;
set xlfile;                                                                                                                             &lt;BR /&gt;
sasdate=input(xldate,mmddyy10.);                                                                                                        &lt;BR /&gt;
run;</description>
    <pubDate>Wed, 28 Oct 2009 20:28:38 GMT</pubDate>
    <dc:creator>Bill</dc:creator>
    <dc:date>2009-10-28T20:28:38Z</dc:date>
    <item>
      <title>Please help - converting text date to date</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Please-help-converting-text-date-to-date/m-p/9342#M617</link>
      <description>I have a list of dates stored in an Excel file as text. They are stored as 9/1/2001, 9/2/2001, etc. But their type are all texts. When read these values into SAS using import they are stored as characters. I tried everything trying to convert them to date format but just couldn't work. Anyone know how to get around this? Thanks!</description>
      <pubDate>Wed, 28 Oct 2009 19:55:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Please-help-converting-text-date-to-date/m-p/9342#M617</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2009-10-28T19:55:25Z</dc:date>
    </item>
    <item>
      <title>Re: Please help - converting text date to date</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Please-help-converting-text-date-to-date/m-p/9343#M618</link>
      <description>perhaps this will work for you ...&lt;BR /&gt;
&lt;BR /&gt;
data sasfile;                                                                                                                           &lt;BR /&gt;
set xlfile;                                                                                                                             &lt;BR /&gt;
sasdate=input(xldate,ddmmyy10.);                                                                                                        &lt;BR /&gt;
run;</description>
      <pubDate>Wed, 28 Oct 2009 20:17:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Please-help-converting-text-date-to-date/m-p/9343#M618</guid>
      <dc:creator>Bill</dc:creator>
      <dc:date>2009-10-28T20:17:13Z</dc:date>
    </item>
    <item>
      <title>Re: Please help - converting text date to date</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Please-help-converting-text-date-to-date/m-p/9344#M619</link>
      <description>The original format of the data is in mmddyy format. If I use ddmmyy10. will that mess up the mm and dd?</description>
      <pubDate>Wed, 28 Oct 2009 20:22:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Please-help-converting-text-date-to-date/m-p/9344#M619</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2009-10-28T20:22:58Z</dc:date>
    </item>
    <item>
      <title>Re: Please help - converting text date to date</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Please-help-converting-text-date-to-date/m-p/9345#M620</link>
      <description>use &lt;BR /&gt;
&lt;BR /&gt;
data sasfile;                                                                                                                           &lt;BR /&gt;
set xlfile;                                                                                                                             &lt;BR /&gt;
sasdate=input(xldate,mmddyy10.);                                                                                                        &lt;BR /&gt;
run;</description>
      <pubDate>Wed, 28 Oct 2009 20:28:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Please-help-converting-text-date-to-date/m-p/9345#M620</guid>
      <dc:creator>Bill</dc:creator>
      <dc:date>2009-10-28T20:28:38Z</dc:date>
    </item>
    <item>
      <title>Re: Please help - converting text date to date</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Please-help-converting-text-date-to-date/m-p/9346#M621</link>
      <description>Hi:&lt;BR /&gt;
  Is 9 the MONTH or the DAY???? September 1 or 9 January???  If 9 is the MONTH, then the INFORMAT for your function call (to convert from a character date to a numeric date) would be the MMDDYY informat.&lt;BR /&gt;
 &lt;BR /&gt;
  If the 9 is the DAY and 1 is the MONTH then you would use a different INFORMAT, as shown in the other answer.&lt;BR /&gt;
 &lt;BR /&gt;
  The explanation for WHY you need to convert is that SAS dates are represented as the number of days from a 0 date. SAS uses Jan 1, 1960 as the 0 date. So, for example, compare these calendar dates with their internally stored values.&lt;BR /&gt;
[pre]&lt;BR /&gt;
calendar date:  | Nov 15, 1950 | Dec 31, 1959 | Jan 1, 1960 | Jan 2, 1960 | Nov 15, 1960&lt;BR /&gt;
SAS date value: |  -3334       |    -1        |    0        |    1        |    319&lt;BR /&gt;
[/pre]&lt;BR /&gt;
                      &lt;BR /&gt;
When represented on a scale line this, SAS date values can be negative numbers and represent time all the way back to the start of the Gregorian calendar, as described here:&lt;BR /&gt;
&lt;A href="http://support.sas.com/documentation/cdl/en/basess/58133/HTML/default/a001397898.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/basess/58133/HTML/default/a001397898.htm&lt;/A&gt;&lt;BR /&gt;
 ...where it explains that:&lt;BR /&gt;
&lt;B&gt;" Note:   SAS date values are valid for dates based on the Gregorian calendar from A.D. 1582 through A.D. 19,900. Use caution when working with historical dates. Although the Gregorian calendar was used throughout most of Europe from 1582, Great Britain and the American colonies did not adopt the calendar until 1752." &lt;/B&gt;&lt;BR /&gt;
 &lt;BR /&gt;
So when you have a text string that represents a date value, if you want to work with that variable, as a DATE value, in a SAS program or so you can use SAS formats or calculate time intervals, you have to convert the character string to a number using an INPUT function. When you convert a character variable or constant to a numeric variable, you need an INFORMAT that is appropriate for the conversion. In this case you would use an INFORMAT that would take your character string and convert it to the number of days since Jan 1, 1960.&lt;BR /&gt;
 &lt;BR /&gt;
Here are some more documentation links about working with SAS date values:&lt;BR /&gt;
&lt;A href="http://support.sas.com/documentation/cdl/en/basess/58133/HTML/default/a001397930.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/basess/58133/HTML/default/a001397930.htm&lt;/A&gt;&lt;BR /&gt;
&lt;A href="http://support.sas.com/documentation/cdl/en/basess/58133/HTML/default/a001397901.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/basess/58133/HTML/default/a001397901.htm&lt;/A&gt;&lt;BR /&gt;
&lt;A href="http://support.sas.com/documentation/cdl/en/basess/58133/HTML/default/a001397947.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/basess/58133/HTML/default/a001397947.htm&lt;/A&gt;&lt;BR /&gt;
 &lt;BR /&gt;
cynthia</description>
      <pubDate>Wed, 28 Oct 2009 20:45:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Please-help-converting-text-date-to-date/m-p/9346#M621</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2009-10-28T20:45:22Z</dc:date>
    </item>
    <item>
      <title>Re: Please help - converting text date to date</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Please-help-converting-text-date-to-date/m-p/9347#M622</link>
      <description>I used the exact same step and I get the following:&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
NOTE: Invalid argument to function INPUT at line 12 column 16.&lt;BR /&gt;
a=10/10/2002 b=23APR2009 c=10/10/2002 datebook=. _ERROR_=1 _N_=93&lt;BR /&gt;
NOTE: Invalid argument to function INPUT at line 12 column 16.&lt;BR /&gt;
a=10/10/2002 b=22APR2009 c=10/10/2002 datebook=. _ERROR_=1 _N_=94&lt;BR /&gt;
NOTE: Invalid argument to function INPUT at line 12 column 16.&lt;BR /&gt;
a=10/10/2002 b=20APR2009 c=10/10/2002 datebook=. _ERROR_=1 _N_=95&lt;BR /&gt;
NOTE: Invalid argument to function INPUT at line 12 column 16.&lt;BR /&gt;
a=10/10/2002 b=20APR2009 c=10/10/2002 datebook=. _ERROR_=1 _N_=96&lt;BR /&gt;
NOTE: Invalid argument to function INPUT at line 12 column 16.</description>
      <pubDate>Wed, 28 Oct 2009 21:09:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Please-help-converting-text-date-to-date/m-p/9347#M622</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2009-10-28T21:09:30Z</dc:date>
    </item>
    <item>
      <title>Re: Please help - converting text date to date</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Please-help-converting-text-date-to-date/m-p/9348#M623</link>
      <description>9    data try;&lt;BR /&gt;
10       set book;&lt;BR /&gt;
11&lt;BR /&gt;
12       datebook = input(a, mmddyy10.);&lt;BR /&gt;
13   run</description>
      <pubDate>Wed, 28 Oct 2009 21:12:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Please-help-converting-text-date-to-date/m-p/9348#M623</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2009-10-28T21:12:20Z</dc:date>
    </item>
    <item>
      <title>Re: Please help - converting text date to date</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Please-help-converting-text-date-to-date/m-p/9349#M624</link>
      <description>The data are in month/day/year format. They are stored in Excel but in text format. When I use import to import the data using SAS, the variable ended up in character type. I am trying to convert it to numeric type with date format. This should be a very short program. However, I keep getting errors. Here's my code:&lt;BR /&gt;
&lt;BR /&gt;
data try;&lt;BR /&gt;
  set imported_data;&lt;BR /&gt;
&lt;BR /&gt;
  new_date_var = input(old_char_var, mmddyy10.);&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
I changed the variable names to make it clear. I get the same error messages in the log window for Bill. I am not sure what I am doing wrong. You said I should use an informat for this input function. I tried it also and it still doesn't work.&lt;BR /&gt;
&lt;BR /&gt;
I tried both of the following code:&lt;BR /&gt;
data try;&lt;BR /&gt;
  set imported_data;&lt;BR /&gt;
&lt;BR /&gt;
  new_date_var = input(old_char_var, mmddyy10.);&lt;BR /&gt;
  informat new_date_var date9.;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
data try;&lt;BR /&gt;
  set imported_data;&lt;BR /&gt;
&lt;BR /&gt;
  informat new_date_var date9.;&lt;BR /&gt;
  new_date_var = input(old_char_var, mmddyy10.);&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
thanks again for your help.&lt;BR /&gt;
&lt;BR /&gt;
Thanks for your help too, Bill!</description>
      <pubDate>Wed, 28 Oct 2009 21:20:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Please-help-converting-text-date-to-date/m-p/9349#M624</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2009-10-28T21:20:18Z</dc:date>
    </item>
    <item>
      <title>Re: Please help - converting text date to date</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Please-help-converting-text-date-to-date/m-p/9350#M625</link>
      <description>Hi:&lt;BR /&gt;
  Try this:&lt;BR /&gt;
[pre]&lt;BR /&gt;
proc contents data=imported_data;&lt;BR /&gt;
  title 'PROC CONTENTS';&lt;BR /&gt;
run;&lt;BR /&gt;
                                       &lt;BR /&gt;
proc print data=imported_data;&lt;BR /&gt;
  title 'Without any formats';&lt;BR /&gt;
  format _numeric_ _character_;  &amp;lt;-- or use whatever your variable names are;&lt;BR /&gt;
run;&lt;BR /&gt;
[/pre]&lt;BR /&gt;
 &lt;BR /&gt;
The NULL format statement removes any usage of SAS formats from the display of the data -- so you would see the numbers and text strings without any SAS format being used. So, if you still see 10/1/2002 in the PROC PRINT output, then you know the variable is CHARACTER. The PROC CONTENTS will also tell you whether the variable is character or numeric and whether any FORMATS or INFORMATS have been applied to the variable. &lt;BR /&gt;
&lt;BR /&gt;
You might switch to the ANYDTDTE INFORMAT in your INPUT function, if MMDDYY10 doesn't work.&lt;BR /&gt;
&lt;A href="http://support.sas.com/documentation/cdl/en/lrdict/62618/HTML/default/a002605538.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/lrdict/62618/HTML/default/a002605538.htm&lt;/A&gt;&lt;BR /&gt;
       &lt;BR /&gt;
 Is it possible your variable is a DATE/TIME variable in Excel and NOT just a DATE variable???? When you go into Excel and look at the format for that column, is the Excel format set explicitly to TEXT or is the Excel format a DATE or DATE/TIME format???? &lt;BR /&gt;
 &lt;BR /&gt;
cynthia</description>
      <pubDate>Wed, 28 Oct 2009 22:16:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Please-help-converting-text-date-to-date/m-p/9350#M625</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2009-10-28T22:16:09Z</dc:date>
    </item>
    <item>
      <title>Re: Please help - converting text date to date</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Please-help-converting-text-date-to-date/m-p/9351#M626</link>
      <description>Hi Cynthia,&lt;BR /&gt;
&lt;BR /&gt;
The variable is Character. I confirmed it by running the code you have shown me. Except of using variable names directly, I used _all_. Because when I use a specific variable name it tells me that variable is not found. For example, if I used &lt;BR /&gt;
&lt;BR /&gt;
  format _variable1_;&lt;BR /&gt;
&lt;BR /&gt;
It will tell me variable1 not found in data imported_data. That's why I used &lt;BR /&gt;
 &lt;BR /&gt;
  format _all_;&lt;BR /&gt;
&lt;BR /&gt;
instead. &lt;BR /&gt;
&lt;BR /&gt;
Now that I know the variable is character, how do I convert it to date? I have tried the code earlier from Bill and you and they didn't work. The original format in Excel is set explicitly to Text. I am so stuck right now.</description>
      <pubDate>Thu, 29 Oct 2009 14:38:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Please-help-converting-text-date-to-date/m-p/9351#M626</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2009-10-29T14:38:02Z</dc:date>
    </item>
    <item>
      <title>Re: Please help - converting text date to date</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Please-help-converting-text-date-to-date/m-p/9352#M627</link>
      <description>The SAS support  &lt;A href="http://support.sas.com/" target="_blank"&gt;http://support.sas.com/&lt;/A&gt;  website has SAS-hosted documentation and supplemental technical and conference reference material.&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.&lt;BR /&gt;
&lt;BR /&gt;
Recommended reading:&lt;BR /&gt;
&lt;BR /&gt;
SAS Language Reference: Concepts - About SAS Date, Time, and Datetime Values&lt;BR /&gt;
&lt;A href="http://support.sas.com/documentation/cdl/en/lrcon/61722/HTML/default/a002200738.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/lrcon/61722/HTML/default/a002200738.htm&lt;/A&gt;&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
A Beginners Guide to SAS  Date and Time Handling&lt;BR /&gt;
Wayne Finley, State of California HHSDC, Sacramento, CA&lt;BR /&gt;
&lt;BR /&gt;
&lt;A href="http://www2.sas.com/proceedings/sugi25/25/btu/25p058.pdf" target="_blank"&gt;http://www2.sas.com/proceedings/sugi25/25/btu/25p058.pdf&lt;/A&gt;&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
SAS Constants in Expressions - DATE and TIME references discussed here:&lt;BR /&gt;
&lt;A href="http://support.sas.com/documentation/cdl/en/lrcon/61722/HTML/default/a000780334.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/lrcon/61722/HTML/default/a000780334.htm&lt;/A&gt;</description>
      <pubDate>Thu, 29 Oct 2009 15:01:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Please-help-converting-text-date-to-date/m-p/9352#M627</guid>
      <dc:creator>sbb</dc:creator>
      <dc:date>2009-10-29T15:01:53Z</dc:date>
    </item>
    <item>
      <title>Re: Please help - converting text date to date</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Please-help-converting-text-date-to-date/m-p/9353#M628</link>
      <description>This is too weird. I just run the code again and everything worked. The code I used is what I have used yesterday.&lt;BR /&gt;
&lt;BR /&gt;
data try;&lt;BR /&gt;
	set imported_data;&lt;BR /&gt;
		&lt;BR /&gt;
	new_date_var = input(old_char_var, mmddyy10.);&lt;BR /&gt;
	informat new_date_var mmddyy10.;&lt;BR /&gt;
	format new_date_var mmddyy10.;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
However, when I run this yesterday I get the error messages that I have posted above. When I run them again today everything worked fine. Why is that?</description>
      <pubDate>Thu, 29 Oct 2009 15:02:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Please-help-converting-text-date-to-date/m-p/9353#M628</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2009-10-29T15:02:36Z</dc:date>
    </item>
    <item>
      <title>Re: Please help - converting text date to date</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Please-help-converting-text-date-to-date/m-p/9354#M629</link>
      <description>Without the SAS logs and more details about your processing environment differences/changes from day-to-day, it's a crap-shoot to figure out -- unless yours was a rhetorical question, asked to the digital fjord.&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.</description>
      <pubDate>Thu, 29 Oct 2009 15:20:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Please-help-converting-text-date-to-date/m-p/9354#M629</guid>
      <dc:creator>sbb</dc:creator>
      <dc:date>2009-10-29T15:20:48Z</dc:date>
    </item>
    <item>
      <title>Re: Please help - converting text date to date</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Please-help-converting-text-date-to-date/m-p/9355#M630</link>
      <description>Actually, that didn't work. It worked on 90% of the data. 10% of the data ended up with missing values. Why is this?</description>
      <pubDate>Thu, 29 Oct 2009 15:24:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Please-help-converting-text-date-to-date/m-p/9355#M630</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2009-10-29T15:24:02Z</dc:date>
    </item>
    <item>
      <title>Re: Please help - converting text date to date</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Please-help-converting-text-date-to-date/m-p/9356#M631</link>
      <description>Here is a sample output:&lt;BR /&gt;
&lt;BR /&gt;
&lt;B&gt;Obs  char_var       date_var&lt;/B&gt;&lt;BR /&gt;
90     10/9/2002       10/09/2002 &lt;BR /&gt;
91     10/9/2002       10/09/2002 &lt;BR /&gt;
92     10/9/2002       10/09/2002 &lt;BR /&gt;
93     10/10/2002        . &lt;BR /&gt;
94     10/10/2002        . &lt;BR /&gt;
126  10/30/2002       . &lt;BR /&gt;
127  10/31/2002       . &lt;BR /&gt;
128  11/1/2002      11/01/2002 &lt;BR /&gt;
129  11/2/2002      11/02/2002 &lt;BR /&gt;
&lt;BR /&gt;
The . did not line up right. But they represent missing values. I do not understand this. If they are reading in the same variable how come they can read in only partial of it?&lt;BR /&gt;
&lt;BR /&gt;
Message was edited by: cosmid&lt;BR /&gt;
&lt;BR /&gt;
Message was edited by: cosmid&lt;BR /&gt;
&lt;BR /&gt;
Message was edited by: cosmid

Message was edited by: cosmid</description>
      <pubDate>Thu, 29 Oct 2009 15:35:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Please-help-converting-text-date-to-date/m-p/9356#M631</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2009-10-29T15:35:36Z</dc:date>
    </item>
    <item>
      <title>Re: Please help - converting text date to date</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Please-help-converting-text-date-to-date/m-p/9357#M632</link>
      <description>It isn't a rhetorical question. I have copy and pasted the logs above. I am trying to read in a variable listing dates but in text format from Excel to SAS. The variable ended up in character and some ended up missing.</description>
      <pubDate>Thu, 29 Oct 2009 15:40:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Please-help-converting-text-date-to-date/m-p/9357#M632</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2009-10-29T15:40:05Z</dc:date>
    </item>
    <item>
      <title>Re: Please help - converting text date to date</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Please-help-converting-text-date-to-date/m-p/9358#M633</link>
      <description>I think I know why some of the values ended up missing. Because of the default length of the variable and the data weren't read completely and that's why they ended up in missing.&lt;BR /&gt;
&lt;BR /&gt;
how do i delete posts that i have posted?</description>
      <pubDate>Thu, 29 Oct 2009 15:50:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Please-help-converting-text-date-to-date/m-p/9358#M633</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2009-10-29T15:50:18Z</dc:date>
    </item>
    <item>
      <title>Re: Please help - converting text date to date</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Please-help-converting-text-date-to-date/m-p/9359#M634</link>
      <description>Your best opportunity is to add the following SAS statement to your DATA step (after all assignment statements) for diagnostic and self-initiated desk-checking:&lt;BR /&gt;
&lt;BR /&gt;
PUTLOG _ALL_;&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Also, sharing the SAS generated log with your DATA step code into a post-reply will get the most distance from others' helping debug your program and input data.&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.</description>
      <pubDate>Thu, 29 Oct 2009 17:35:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Please-help-converting-text-date-to-date/m-p/9359#M634</guid>
      <dc:creator>sbb</dc:creator>
      <dc:date>2009-10-29T17:35:33Z</dc:date>
    </item>
    <item>
      <title>Re: Please help - converting text date to date</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Please-help-converting-text-date-to-date/m-p/9360#M635</link>
      <description>cosmid;&lt;BR /&gt;
&lt;BR /&gt;
Might some of the dates be invalid thus generating a missing value, e.g. month value &amp;gt; 12, day value &amp;gt;28/29/30/31 in their respective months?  SAS does that error checking.  I'd be surprised if xl did.</description>
      <pubDate>Thu, 29 Oct 2009 18:50:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Please-help-converting-text-date-to-date/m-p/9360#M635</guid>
      <dc:creator>Bill</dc:creator>
      <dc:date>2009-10-29T18:50:01Z</dc:date>
    </item>
    <item>
      <title>Re: Please help - converting text date to date</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Please-help-converting-text-date-to-date/m-p/9361#M636</link>
      <description>Cosmid,&lt;BR /&gt;
&lt;BR /&gt;
Did you do the import in SAS/EG?&lt;BR /&gt;
Or, are you using PC SAS?&lt;BR /&gt;
Or, are you running regular batch SAS?&lt;BR /&gt;
&lt;BR /&gt;
It makes a difference in what the product "remembers" with reruns of stuff.&lt;BR /&gt;
&lt;BR /&gt;
It is possible that you need to use numerical_date = input(trim(left(text_date)),mmddyy10.);&lt;BR /&gt;
&lt;BR /&gt;
You should be able to define in the proc import the informat for the column in the excel file you are importing.&lt;BR /&gt;
&lt;BR /&gt;
If you are using SAS/EG, you may need to delete the old import and create a new one to be able to get the filed lengths and informats set properly and remembered properly.  Import in SAS/EG is a bit flaky at times.</description>
      <pubDate>Fri, 30 Oct 2009 20:49:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Please-help-converting-text-date-to-date/m-p/9361#M636</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2009-10-30T20:49:32Z</dc:date>
    </item>
  </channel>
</rss>

