<?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: how to convert char var to sas date? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/how-to-convert-char-var-to-sas-date/m-p/45074#M9253</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can use and INFORMAT to read what I will assume is MONTH and YEAR&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;DIV style="font-family: Courier New; font-size: 11pt;"&gt;&lt;STRONG style="color: #000080; background-color: #ffffff;"&gt;data&lt;/STRONG&gt; &lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;_null_&lt;/SPAN&gt;; &lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; monyy = &lt;/SPAN&gt;&lt;SPAN style="color: #800080; background-color: #ffffff;"&gt;'jan_09'&lt;/SPAN&gt;; &lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; date = input(monyy,&lt;/SPAN&gt;&lt;SPAN style="color: #008080; background-color: #ffffff;"&gt;monyy10.&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;);&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;put&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; date=&lt;/SPAN&gt;&lt;SPAN style="color: #008080; background-color: #ffffff;"&gt;date9.&lt;/SPAN&gt;; &lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;STRONG style="color: #000080; background-color: #ffffff;"&gt;run&lt;/STRONG&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 28 Jan 2013 11:55:15 GMT</pubDate>
    <dc:creator>data_null__</dc:creator>
    <dc:date>2013-01-28T11:55:15Z</dc:date>
    <item>
      <title>how to convert char var to sas date?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-convert-char-var-to-sas-date/m-p/45067#M9246</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a variable CPN_DT that is char, length 80 format $80, has following value:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;05/21/2010&lt;/P&gt;&lt;P&gt;07/01/2010&lt;/P&gt;&lt;P&gt;03/01/2011&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How do I convert it to sas date? I used following, but it doesn't work&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #008000; font-size: 10pt; font-family: Courier New;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;cpn_dt = input(trim(cpn_dt),MMDDYY10.);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can I fix this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I really wonder why sas read this as char type with length of 80, because I got this variable via proc sql through odbc to oracle database.&lt;/P&gt;&lt;P&gt;why does SAS not recognize this as a mmddyy10. value?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Feb 2012 01:27:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-convert-char-var-to-sas-date/m-p/45067#M9246</guid>
      <dc:creator>ZRick</dc:creator>
      <dc:date>2012-02-03T01:27:17Z</dc:date>
    </item>
    <item>
      <title>how to convert char var to sas date?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-convert-char-var-to-sas-date/m-p/45068#M9247</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well, it seems working for me, please see:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data have;&lt;/P&gt;&lt;P&gt;infile cards;&lt;/P&gt;&lt;P&gt;informat date $80.;&lt;/P&gt;&lt;P&gt;input date ;&lt;/P&gt;&lt;P&gt;cards;&lt;/P&gt;&lt;P&gt;05/21/2010&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;07/01/2010&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;03/01/2011&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data want;&lt;/P&gt;&lt;P&gt;set have;&lt;/P&gt;&lt;P&gt;format _date mmddyy10.;&lt;/P&gt;&lt;P&gt;_date=input(trim(date),MMDDYY10.);&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;proc print;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My suspicion is that you can't just convert char to numeric under the SAME variable name. You have to create another variable to the job, and if you want your old name back, you can always do it using date step options like: drop= rename=.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, without seeing your code and log, I can be totally off on this one.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Haikuo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Feb 2012 01:49:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-convert-char-var-to-sas-date/m-p/45068#M9247</guid>
      <dc:creator>Haikuo</dc:creator>
      <dc:date>2012-02-03T01:49:47Z</dc:date>
    </item>
    <item>
      <title>how to convert char var to sas date?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-convert-char-var-to-sas-date/m-p/45069#M9248</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I would guess that, given its length, it has more than that much extra blank space.&amp;nbsp; Try:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="background-color: #eef4f9; font-size: 12px; font-family: Arial, Helvetica, sans-serif;"&gt;cpn_dt = input(substr(strip(cpn_dt),1,10),MMDDYY10.);&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Feb 2012 04:37:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-convert-char-var-to-sas-date/m-p/45069#M9248</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2012-02-03T04:37:05Z</dc:date>
    </item>
    <item>
      <title>how to convert char var to sas date?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-convert-char-var-to-sas-date/m-p/45070#M9249</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Strip() is sufficient.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; data _null_;&lt;BR /&gt;&amp;nbsp; length havevar $ 80;&lt;BR /&gt;&amp;nbsp; havevar='&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 05/21/2010&amp;nbsp;&amp;nbsp; ';&lt;BR /&gt;&amp;nbsp; wantvar=input(strip(havevar),mmddyy11.);&lt;BR /&gt;&amp;nbsp; put wantvar= date9.;&lt;BR /&gt;run;&lt;/P&gt;&lt;DIV class="mcePaste" id="_mcePaste" style="position: absolute; width: 1px; height: 1px; overflow: hidden; top: 0px; left: -10000px;"&gt;﻿&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Feb 2012 07:51:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-convert-char-var-to-sas-date/m-p/45070#M9249</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2012-02-03T07:51:29Z</dc:date>
    </item>
    <item>
      <title>how to convert char var to sas date?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-convert-char-var-to-sas-date/m-p/45071#M9250</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Patrick, I added the substr function in the event that there are additional characters that strip wouldn't remove.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Feb 2012 13:29:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-convert-char-var-to-sas-date/m-p/45071#M9250</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2012-02-03T13:29:48Z</dc:date>
    </item>
    <item>
      <title>Re: how to convert char var to sas date?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-convert-char-var-to-sas-date/m-p/45072#M9251</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Art,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I just noticed that if we use the same variable name, the variable converted by datastep is a char. variable, by SQL is a numeric variable. Thank you!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: navy; font-size: 12pt; background-color: white; font-family: 'Courier New';"&gt;data&lt;/STRONG&gt;&lt;SPAN style="background-color: white; font-family: 'Courier New'; color: black; font-size: 12pt;"&gt; have;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: white; font-family: 'Courier New'; color: blue; font-size: 12pt;"&gt;infile&lt;/SPAN&gt;&lt;SPAN style="background-color: white; font-family: 'Courier New'; color: black; font-size: 12pt;"&gt; cards;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: white; font-family: 'Courier New'; color: blue; font-size: 12pt;"&gt;informat&lt;/SPAN&gt;&lt;SPAN style="background-color: white; font-family: 'Courier New'; color: black; font-size: 12pt;"&gt; cpn_dt &lt;/SPAN&gt;&lt;SPAN style="background-color: white; font-family: 'Courier New'; color: teal; font-size: 12pt;"&gt;$80.&lt;/SPAN&gt;&lt;SPAN style="background-color: white; font-family: 'Courier New'; color: black; font-size: 12pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: white; font-family: 'Courier New'; color: blue; font-size: 12pt;"&gt;input&lt;/SPAN&gt;&lt;SPAN style="background-color: white; font-family: 'Courier New'; color: black; font-size: 12pt;"&gt; cpn_dt ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: white; font-family: 'Courier New'; color: blue; font-size: 12pt;"&gt;cards&lt;/SPAN&gt;&lt;SPAN style="background-color: white; font-family: 'Courier New'; color: black; font-size: 12pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffc0; font-family: 'Courier New'; color: black; font-size: 12pt;"&gt;05/21/2010&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffc0; font-family: 'Courier New'; color: black; font-size: 12pt;"&gt;07/01/2010&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffc0; font-family: 'Courier New'; color: black; font-size: 12pt;"&gt;03/01/2011&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: white; font-family: 'Courier New'; color: black; font-size: 12pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: white; font-family: 'Courier New'; color: black; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: navy; font-size: 12pt; background-color: white; font-family: 'Courier New';"&gt;data&lt;/STRONG&gt;&lt;SPAN style="background-color: white; font-family: 'Courier New'; color: black; font-size: 12pt;"&gt; want;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;SPAN style="background-color: white; font-family: 'Courier New'; color: blue; font-size: 12pt;"&gt;set&lt;/SPAN&gt;&lt;SPAN style="background-color: white; font-family: 'Courier New'; color: black; font-size: 12pt;"&gt; have;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: white; font-family: 'Courier New'; color: black; font-size: 12pt;"&gt;&amp;nbsp; cpn_dt = input(substr(strip(cpn_dt),&lt;/SPAN&gt;&lt;STRONG style="color: teal; font-size: 12pt; background-color: white; font-family: 'Courier New';"&gt;1&lt;/STRONG&gt;&lt;SPAN style="background-color: white; font-family: 'Courier New'; color: black; font-size: 12pt;"&gt;,&lt;/SPAN&gt;&lt;STRONG style="color: teal; font-size: 12pt; background-color: white; font-family: 'Courier New';"&gt;10&lt;/STRONG&gt;&lt;SPAN style="background-color: white; font-family: 'Courier New'; color: black; font-size: 12pt;"&gt;),&lt;/SPAN&gt;&lt;SPAN style="background-color: white; font-family: 'Courier New'; color: teal; font-size: 12pt;"&gt;MMDDYY10.&lt;/SPAN&gt;&lt;SPAN style="background-color: white; font-family: 'Courier New'; color: black; font-size: 12pt;"&gt;);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: navy; font-size: 12pt; background-color: white; font-family: 'Courier New';"&gt;run&lt;/STRONG&gt;&lt;SPAN style="background-color: white; font-family: 'Courier New'; color: black; font-size: 12pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: navy; font-size: 12pt; background-color: white; font-family: 'Courier New';"&gt;proc&lt;/STRONG&gt; &lt;STRONG style="color: navy; font-size: 12pt; background-color: white; font-family: 'Courier New';"&gt;contents&lt;/STRONG&gt; &lt;SPAN style="background-color: white; font-family: 'Courier New'; color: blue; font-size: 12pt;"&gt;data&lt;/SPAN&gt;&lt;SPAN style="background-color: white; font-family: 'Courier New'; color: black; font-size: 12pt;"&gt;=want;&lt;/SPAN&gt;&lt;STRONG style="color: navy; font-size: 12pt; background-color: white; font-family: 'Courier New';"&gt;run&lt;/STRONG&gt;&lt;SPAN style="background-color: white; font-family: 'Courier New'; color: black; font-size: 12pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: white; font-family: 'Courier New'; color: black; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: navy; font-size: 12pt; background-color: white; font-family: 'Courier New';"&gt;proc&lt;/STRONG&gt; &lt;STRONG style="color: navy; font-size: 12pt; background-color: white; font-family: 'Courier New';"&gt;sql&lt;/STRONG&gt;&lt;SPAN style="background-color: white; font-family: 'Courier New'; color: black; font-size: 12pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;SPAN style="background-color: white; font-family: 'Courier New'; color: blue; font-size: 12pt;"&gt;create&lt;/SPAN&gt; &lt;SPAN style="background-color: white; font-family: 'Courier New'; color: blue; font-size: 12pt;"&gt;table&lt;/SPAN&gt;&lt;SPAN style="background-color: white; font-family: 'Courier New'; color: black; font-size: 12pt;"&gt; want1 &lt;/SPAN&gt;&lt;SPAN style="background-color: white; font-family: 'Courier New'; color: blue; font-size: 12pt;"&gt;as&lt;/SPAN&gt; &lt;SPAN style="background-color: white; font-family: 'Courier New'; color: blue; font-size: 12pt;"&gt;select&lt;/SPAN&gt;&lt;SPAN style="background-color: white; font-family: 'Courier New'; color: black; font-size: 12pt;"&gt; input(substr(strip(cpn_dt),&lt;/SPAN&gt;&lt;STRONG style="color: teal; font-size: 12pt; background-color: white; font-family: 'Courier New';"&gt;1&lt;/STRONG&gt;&lt;SPAN style="background-color: white; font-family: 'Courier New'; color: black; font-size: 12pt;"&gt;,&lt;/SPAN&gt;&lt;STRONG style="color: teal; font-size: 12pt; background-color: white; font-family: 'Courier New';"&gt;10&lt;/STRONG&gt;&lt;SPAN style="background-color: white; font-family: 'Courier New'; color: black; font-size: 12pt;"&gt;),&lt;/SPAN&gt;&lt;SPAN style="background-color: white; font-family: 'Courier New'; color: teal; font-size: 12pt;"&gt;MMDDYY10.&lt;/SPAN&gt;&lt;SPAN style="background-color: white; font-family: 'Courier New'; color: black; font-size: 12pt;"&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="background-color: white; font-family: 'Courier New'; color: blue; font-size: 12pt;"&gt;as&lt;/SPAN&gt;&lt;SPAN style="background-color: white; font-family: 'Courier New'; color: black; font-size: 12pt;"&gt; cpn_dt &lt;/SPAN&gt;&lt;SPAN style="background-color: white; font-family: 'Courier New'; color: blue; font-size: 12pt;"&gt;format&lt;/SPAN&gt; &lt;SPAN style="background-color: white; font-family: 'Courier New'; color: teal; font-size: 12pt;"&gt;mmddyy10.&lt;/SPAN&gt;&lt;SPAN style="background-color: white; font-family: 'Courier New'; color: black; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="background-color: white; font-family: 'Courier New'; color: blue; font-size: 12pt;"&gt;from&lt;/SPAN&gt;&lt;SPAN style="background-color: white; font-family: 'Courier New'; color: black; font-size: 12pt;"&gt; have;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: navy; font-size: 12pt; background-color: white; font-family: 'Courier New';"&gt;quit&lt;/STRONG&gt;&lt;SPAN style="background-color: white; font-family: 'Courier New'; color: black; font-size: 12pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: navy; font-size: 12pt; background-color: white; font-family: 'Courier New';"&gt;proc&lt;/STRONG&gt; &lt;STRONG style="color: navy; font-size: 12pt; background-color: white; font-family: 'Courier New';"&gt;contents&lt;/STRONG&gt; &lt;SPAN style="background-color: white; font-family: 'Courier New'; color: blue; font-size: 12pt;"&gt;data&lt;/SPAN&gt;&lt;SPAN style="background-color: white; font-family: 'Courier New'; color: black; font-size: 12pt;"&gt;=want1;&lt;/SPAN&gt;&lt;STRONG style="color: navy; font-size: 12pt; background-color: white; font-family: 'Courier New';"&gt;run&lt;/STRONG&gt;;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Feb 2012 13:57:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-convert-char-var-to-sas-date/m-p/45072#M9251</guid>
      <dc:creator>Linlin</dc:creator>
      <dc:date>2012-02-03T13:57:28Z</dc:date>
    </item>
    <item>
      <title>Re: how to convert char var to sas date?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-convert-char-var-to-sas-date/m-p/45073#M9252</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello All,&lt;/P&gt;&lt;P&gt;I need help converting a character into a numeric. The variable is CHAR 8 and in a format like Jan_09. Do I need to separate all the Months off and assign them a 1-12 value and separate the years and then put them together again.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kindly assist..from a very new user!&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Jan 2013 11:41:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-convert-char-var-to-sas-date/m-p/45073#M9252</guid>
      <dc:creator>angeli</dc:creator>
      <dc:date>2013-01-28T11:41:18Z</dc:date>
    </item>
    <item>
      <title>Re: how to convert char var to sas date?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-convert-char-var-to-sas-date/m-p/45074#M9253</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can use and INFORMAT to read what I will assume is MONTH and YEAR&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;DIV style="font-family: Courier New; font-size: 11pt;"&gt;&lt;STRONG style="color: #000080; background-color: #ffffff;"&gt;data&lt;/STRONG&gt; &lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;_null_&lt;/SPAN&gt;; &lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; monyy = &lt;/SPAN&gt;&lt;SPAN style="color: #800080; background-color: #ffffff;"&gt;'jan_09'&lt;/SPAN&gt;; &lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; date = input(monyy,&lt;/SPAN&gt;&lt;SPAN style="color: #008080; background-color: #ffffff;"&gt;monyy10.&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;);&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;put&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; date=&lt;/SPAN&gt;&lt;SPAN style="color: #008080; background-color: #ffffff;"&gt;date9.&lt;/SPAN&gt;; &lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;STRONG style="color: #000080; background-color: #ffffff;"&gt;run&lt;/STRONG&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Jan 2013 11:55:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-convert-char-var-to-sas-date/m-p/45074#M9253</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2013-01-28T11:55:15Z</dc:date>
    </item>
    <item>
      <title>Re: how to convert char var to sas date?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-convert-char-var-to-sas-date/m-p/45075#M9254</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks! SO then it makes a new variable called date which is in this format: 17898 How do I get this now to a date?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Jan 2013 20:54:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-convert-char-var-to-sas-date/m-p/45075#M9254</guid>
      <dc:creator>angeli</dc:creator>
      <dc:date>2013-01-28T20:54:14Z</dc:date>
    </item>
    <item>
      <title>Re: how to convert char var to sas date?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-convert-char-var-to-sas-date/m-p/45076#M9255</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The new variable is a SAS Date it is the day offset from from the reference date.&amp;nbsp; You can display the value with any SAS DATE format.&amp;nbsp; See online docs.&amp;nbsp; I used date9 in my example.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Jan 2013 21:48:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-convert-char-var-to-sas-date/m-p/45076#M9255</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2013-01-28T21:48:36Z</dc:date>
    </item>
    <item>
      <title>Re: how to convert char var to sas date?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-convert-char-var-to-sas-date/m-p/45077#M9256</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Data Null!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Feb 2013 16:34:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-convert-char-var-to-sas-date/m-p/45077#M9256</guid>
      <dc:creator>angeli</dc:creator>
      <dc:date>2013-02-07T16:34:52Z</dc:date>
    </item>
    <item>
      <title>Re: how to convert char var to sas date?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-convert-char-var-to-sas-date/m-p/45078#M9257</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;if I have a char of&amp;nbsp; '2011-01-01', how can I convert it to SAS date value and format? thank you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Mar 2013 18:15:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-convert-char-var-to-sas-date/m-p/45078#M9257</guid>
      <dc:creator>NN2</dc:creator>
      <dc:date>2013-03-29T18:15:49Z</dc:date>
    </item>
    <item>
      <title>Re: how to convert char var to sas date?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-convert-char-var-to-sas-date/m-p/45079#M9258</link>
      <description>&lt;P&gt;&lt;EM&gt;Editor's Note:&amp;nbsp;&lt;/EM&gt;&lt;EM&gt;This topic is&amp;nbsp;&lt;STRONG&gt;very&lt;/STRONG&gt;&amp;nbsp;popular!&amp;nbsp;&lt;/EM&gt;&lt;EM&gt;Cynthia's answer below is correct for the original question, helped by responses from&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13884"&gt;@ballardw&lt;/a&gt;,&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/15410"&gt;@data_null__&lt;/a&gt;, and others. &amp;nbsp;SAS Technical Support has also refreshed the &lt;A href="http://support.sas.com/kb/24/590.html" target="_self"&gt;SAS Sample: Convert variable values from character to numeric or from numeric to character.&lt;/A&gt;&amp;nbsp;with many variations of char-&amp;gt;num, char-&amp;gt;date, num-&amp;gt;char, and more. &amp;nbsp;If you're just learning, &lt;A href="http://support.sas.com/kb/24/590.html" target="_self"&gt;check it out!&lt;/A&gt;&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;In addition, this 9-minute video demonstrates what to do:&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;&lt;div class="video-embed-center video-embed"&gt;&lt;iframe class="embedly-embed" src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FKXCygvFrJqY%3Flist%3DPLVV6eZFA22QwrXd6nSDU18E6XgXSMOs87%26start%3D0&amp;amp;display_name=YouTube&amp;amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DKXCygvFrJqY&amp;amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FKXCygvFrJqY%2Fhqdefault.jpg&amp;amp;type=text%2Fhtml&amp;amp;schema=youtube" width="400" height="225" scrolling="no" title="SAS Tutorial | How to convert character to numeric in SAS" frameborder="0" allow="autoplay; fullscreen; encrypted-media; picture-in-picture;" allowfullscreen="true"&gt;&lt;/iframe&gt;&lt;/div&gt;&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hi:&lt;/P&gt;
&lt;P&gt;You would use a variation of data _null_'s example program. Basically, the INPUT function will convert a character string into a number. You need to use an INFORMAT (such as yymmdd10.) in order to instruct SAS how to do the conversion from character to numeric.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;cynthia&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data testdate;
&amp;nbsp;&amp;nbsp; length chardate $10;
&amp;nbsp;&amp;nbsp; infile datalines;
&amp;nbsp;&amp;nbsp; input chardate $;
&amp;nbsp;&amp;nbsp; date = input(chardate,yymmdd10.);
return;
datalines;
2011-01-01
1960-01-01
1984-11-29
2013-03-29
;
run;
&amp;nbsp;&amp;nbsp;
ods listing;
proc print data=testdate;
&amp;nbsp; title '1) Internally stored values';
run;
&amp;nbsp;
proc print data=testdate;
&amp;nbsp; title '2) Using SAS format with dates';
&amp;nbsp; format date worddate.;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 26 Jul 2019 21:26:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-convert-char-var-to-sas-date/m-p/45079#M9258</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2019-07-26T21:26:06Z</dc:date>
    </item>
    <item>
      <title>Re: how to convert char var to sas date?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-convert-char-var-to-sas-date/m-p/45080#M9259</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you, Cynthia.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Apr 2013 17:09:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-convert-char-var-to-sas-date/m-p/45080#M9259</guid>
      <dc:creator>NN2</dc:creator>
      <dc:date>2013-04-19T17:09:00Z</dc:date>
    </item>
    <item>
      <title>Re: how to convert char var to sas date?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-convert-char-var-to-sas-date/m-p/45081#M9260</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I found this thread trying to solve a similar problem, but am still not having any luck.&amp;nbsp; PROC CONTENTS says that my original variables (hepb1b, hepb2b, polio1b, polio2b, etc. are character variables.&amp;nbsp; They are all dates, and in an array called dates.&amp;nbsp; I'm trying to convert them to numeric dates (via an array called dates2).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;do k=1 to dim(dates);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; dates2{k}=input(strip(dates{k}),mmddyy10.);&lt;/P&gt;&lt;P&gt; put _n_= k= dates{k}= dates2{k}=date9.;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; end;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But, I get an error message about "format $date was not found..." indicating that, although a PROC PRINT shows SAS date values, they are still character.&amp;nbsp; What am I doing wrong????&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Oct 2013 20:11:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-convert-char-var-to-sas-date/m-p/45081#M9260</guid>
      <dc:creator>DebbiBJ</dc:creator>
      <dc:date>2013-10-04T20:11:13Z</dc:date>
    </item>
    <item>
      <title>Re: how to convert char var to sas date?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-convert-char-var-to-sas-date/m-p/45082#M9261</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What do your dates look like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;01Jan2013 or 01/01/2013?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Post your full code as well.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Oct 2013 21:29:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-convert-char-var-to-sas-date/m-p/45082#M9261</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2013-10-04T21:29:39Z</dc:date>
    </item>
    <item>
      <title>Re: how to convert char var to sas date?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-convert-char-var-to-sas-date/m-p/45083#M9262</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi:&lt;/P&gt;&lt;P&gt;&amp;nbsp; It is a bad idea of piggy-back onto an older post. Initially, when I saw the top post from 2012, I almost stopped reading.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; Here's the thing, you didn't show all your code. My guess is that your DATES array is referencing the original CHARACTER vars. Once those vars are declared as CHARACTER, you can't redefine them as numeric. So even though the INPUT function will turn a character string into a number given the right informat, you have to essentially make a new NUMERIC variable (or group of variables) to hold the new NUMERIC variables. My guess is that you might have defined both of your ARRAYs as character by accident. But since you did not show your ARRAY statements, it's hard to be sure.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cynthia&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;data testdate; &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp; length cd1 cd2 cd3 $10;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp; array dates $ cd1-cd3; /* Character array */&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp; array newdates nd1-nd3; /* Numeric array */&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp; infile datalines;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp; input cd1 $ cd2 $ cd3 $;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp; do k=1 to dim(dates);&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; newdates{k}=input(strip(dates{k}),mmddyy10.);&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; put _n_= k= dates{k}= newdates{k}=date9.;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp; end;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;return;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;datalines;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;01/01/2011 01/15/1960 11/15/1950&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;06/18/1953 07/14/1956 11/29/1984&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;run;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;ods listing;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;proc contents data=testdate;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;run;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/11932i7CF6484C9F24ACD9/image-size/large?v=1.0&amp;amp;px=600" border="0" alt="log_from_program.png" title="log_from_program.png" /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Oct 2013 21:30:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-convert-char-var-to-sas-date/m-p/45083#M9262</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2013-10-04T21:30:55Z</dc:date>
    </item>
    <item>
      <title>Re: how to convert char var to sas date?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-convert-char-var-to-sas-date/m-p/45084#M9263</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry Cynthia, I'm new to this community, so my etiquette is probably off...&lt;/P&gt;&lt;P&gt;I will post a thorough response on Monday; brain is too fried now.&amp;nbsp; I appreciate your willingess to help.&amp;nbsp; Have a lovely weekend!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Oct 2013 22:41:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-convert-char-var-to-sas-date/m-p/45084#M9263</guid>
      <dc:creator>DebbiBJ</dc:creator>
      <dc:date>2013-10-04T22:41:33Z</dc:date>
    </item>
    <item>
      <title>Re: how to convert char var to sas date?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-convert-char-var-to-sas-date/m-p/45085#M9264</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Good morning!&lt;/P&gt;&lt;P&gt;I think the root of my problem is in the data, which I've PROC IMPORTed from an excel file.&amp;nbsp; I don't understand why, but the Import reads the same file differently on different runs.&amp;nbsp; That is, the subsequent PROC CONTENTS reads some of the date variables as character and some as numeric; the puzzling part is that it's not consistent which ones it calls which (when I run the program more than once).&amp;nbsp; The data came from someone else; I tried specifically formatting all the date columns as date fields (i've tried both generic and specific date formats), and then as character fields, but that did not solve the problem.&amp;nbsp; Do you have any thoughts?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Oct 2013 15:05:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-convert-char-var-to-sas-date/m-p/45085#M9264</guid>
      <dc:creator>DebbiBJ</dc:creator>
      <dc:date>2013-10-07T15:05:39Z</dc:date>
    </item>
    <item>
      <title>Re: how to convert char var to sas date?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-convert-char-var-to-sas-date/m-p/45086#M9265</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;OK, I've been plugging away at this all day.&amp;nbsp; My problem is that I am PROC IMPORTING an Excel file that has 15 or so date variables (columns).&amp;nbsp; Most of it works fine, but if a variable is is missing in the first record, then any subsequent values for that variable get Imported as a text field rather than a numeric or date field.&amp;nbsp; In the Data step, I've managed to convert them all to numeric fields.&amp;nbsp; But...&amp;nbsp; if the first value is missing then the values that *are* present are converting to weird dates - e.g., 14MAR2072 instead of 13MAR2012.&amp;nbsp; Haven't been able to figure out what to do about that.&amp;nbsp; Help?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Oct 2013 22:23:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-convert-char-var-to-sas-date/m-p/45086#M9265</guid>
      <dc:creator>DebbiBJ</dc:creator>
      <dc:date>2013-10-07T22:23:20Z</dc:date>
    </item>
  </channel>
</rss>

