<?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 conversion of string to date in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/conversion-of-string-to-date/m-p/512148#M137906</link>
    <description>&lt;P&gt;HI ,&lt;/P&gt;&lt;P&gt;i have string reg_date in char format, but when i import to SAS i want it to be date one.&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;reg_date&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;112114&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;022317&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;071615&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;when i try to do using input its not working.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data sas_agent_policy_comp ;&lt;BR /&gt;set sas_agent_policy_comp;&lt;/P&gt;&lt;P&gt;reg_date1=input(regdate,mmddyy10.);&lt;/P&gt;&lt;P&gt;pcyear=year(reg_date);&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i want the informat this variable to be date9. and format should be mmddyy10.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;can you pleaase how can i read that variable as informat date9. into sas.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks,&lt;/P&gt;&lt;P&gt;goutham&lt;/P&gt;</description>
    <pubDate>Mon, 12 Nov 2018 11:11:49 GMT</pubDate>
    <dc:creator>sg_kr</dc:creator>
    <dc:date>2018-11-12T11:11:49Z</dc:date>
    <item>
      <title>conversion of string to date</title>
      <link>https://communities.sas.com/t5/SAS-Programming/conversion-of-string-to-date/m-p/512148#M137906</link>
      <description>&lt;P&gt;HI ,&lt;/P&gt;&lt;P&gt;i have string reg_date in char format, but when i import to SAS i want it to be date one.&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;reg_date&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;112114&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;022317&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;071615&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;when i try to do using input its not working.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data sas_agent_policy_comp ;&lt;BR /&gt;set sas_agent_policy_comp;&lt;/P&gt;&lt;P&gt;reg_date1=input(regdate,mmddyy10.);&lt;/P&gt;&lt;P&gt;pcyear=year(reg_date);&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i want the informat this variable to be date9. and format should be mmddyy10.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;can you pleaase how can i read that variable as informat date9. into sas.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks,&lt;/P&gt;&lt;P&gt;goutham&lt;/P&gt;</description>
      <pubDate>Mon, 12 Nov 2018 11:11:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/conversion-of-string-to-date/m-p/512148#M137906</guid>
      <dc:creator>sg_kr</dc:creator>
      <dc:date>2018-11-12T11:11:49Z</dc:date>
    </item>
    <item>
      <title>Re: conversion of string to date</title>
      <link>https://communities.sas.com/t5/SAS-Programming/conversion-of-string-to-date/m-p/512152#M137907</link>
      <description>&lt;P&gt;And what does that number actually mean:&amp;nbsp;&lt;SPAN&gt;112114?&amp;nbsp; Is it 21Nov14?&amp;nbsp; 14Nov1921?&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;This:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;reg_date1=input(regdate,mmddyy10.);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Will clearly not work as the length of 112114 is not 10, mmddyy10 is expecting 10 characters, e.g. 11-12-2014.&lt;/P&gt;
&lt;P&gt;Perhaps mmddyy6. or the mdy() function.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 12 Nov 2018 11:29:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/conversion-of-string-to-date/m-p/512152#M137907</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2018-11-12T11:29:48Z</dc:date>
    </item>
  </channel>
</rss>

