<?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 change string variable 11/May/2008 to date? in SAS Studio</title>
    <link>https://communities.sas.com/t5/SAS-Studio/How-to-change-string-variable-11-May-2008-to-date/m-p/378838#M3100</link>
    <description>&lt;P&gt;Seems like the DATE informat can read those values, as long as you only have 3 characters for the month. Just make sure to use a large enough width. &amp;nbsp;If you have strings longer than three characters for the month name then you will probably want to use the ANDTDTE informat instead.&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 _null_;
  input string $20. ;
  length informat $20 date 8;
  do informat='date20.','anydtdte20.';
    date=inputn(string,informat);
    put informat= date= date9. ;
  end;
cards;
02 / Nov / 2007
;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;PRE&gt;informat=date20. date=02NOV2007
informat=anydtdte20. date=02NOV2007
&lt;/PRE&gt;
&lt;P&gt;Not sure why you would want to display using mmddyy format as that is just asking for confusion when trying to communicate with people in the EU. &amp;nbsp;Why not use YYMMDD format instead so that nobody confusing Dec 10th for Oct 12th. &amp;nbsp;or use DATE9 since then the month is displayed using letters so again you cannot get confused about which number is the month and which is the day.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 25 Jul 2017 02:22:43 GMT</pubDate>
    <dc:creator>Tom</dc:creator>
    <dc:date>2017-07-25T02:22:43Z</dc:date>
    <item>
      <title>How to change string variable 11/May/2008 to date?</title>
      <link>https://communities.sas.com/t5/SAS-Studio/How-to-change-string-variable-11-May-2008-to-date/m-p/378827#M3094</link>
      <description>&lt;DIV class=" dgrid-row dgrid-row-even ui-state-default dgrid-selected ui-state-active"&gt;&lt;SPAN&gt;&amp;nbsp;I want to change column a (olddate) which has character variables in the format of 11/May/2008 to a newdate column with the date variable with the format MM/DD/YYYY&lt;/SPAN&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 25 Jul 2017 02:40:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/How-to-change-string-variable-11-May-2008-to-date/m-p/378827#M3094</guid>
      <dc:creator>Lauban</dc:creator>
      <dc:date>2017-07-25T02:40:13Z</dc:date>
    </item>
    <item>
      <title>Re: How to change string variable 11/May/2008 to date?</title>
      <link>https://communities.sas.com/t5/SAS-Studio/How-to-change-string-variable-11-May-2008-to-date/m-p/378830#M3095</link>
      <description>&lt;P&gt;use date9. informat to read and then use mmddyy10. format&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data abc;
a='11/May/2008';
b=input(a,date9.);
format b mmddyy10.;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 25 Jul 2017 01:49:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/How-to-change-string-variable-11-May-2008-to-date/m-p/378830#M3095</guid>
      <dc:creator>kiranv_</dc:creator>
      <dc:date>2017-07-25T01:49:37Z</dc:date>
    </item>
    <item>
      <title>Re: How to change string variable 11/May/2008 to date?</title>
      <link>https://communities.sas.com/t5/SAS-Studio/How-to-change-string-variable-11-May-2008-to-date/m-p/378832#M3096</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
input date&amp;amp;:$20.;
new=input(compress(date,' /'),date9.);
format new mmddyy10.;
cards;
02 / Nov / 2007 
;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 25 Jul 2017 01:54:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/How-to-change-string-variable-11-May-2008-to-date/m-p/378832#M3096</guid>
      <dc:creator>Jagadishkatam</dc:creator>
      <dc:date>2017-07-25T01:54:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to change string variable 11/May/2008 to date?</title>
      <link>https://communities.sas.com/t5/SAS-Studio/How-to-change-string-variable-11-May-2008-to-date/m-p/378834#M3097</link>
      <description>&lt;P&gt;Hi I received this:WARNING: Limit set by ERRORS= option reached. Further errors of this type will not be printed. &amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 25 Jul 2017 02:04:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/How-to-change-string-variable-11-May-2008-to-date/m-p/378834#M3097</guid>
      <dc:creator>Lauban</dc:creator>
      <dc:date>2017-07-25T02:04:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to change string variable 11/May/2008 to date?</title>
      <link>https://communities.sas.com/t5/SAS-Studio/How-to-change-string-variable-11-May-2008-to-date/m-p/378835#M3098</link>
      <description>&lt;P&gt;Hi Jadagadish thanks for replying. &amp;nbsp;I want to change column a (olddate) which has character variables in the format of 11/May/2008 to a newdate column with the date variable with the format MM/DD/YYYY. Your code does not work for me, but I may have made a mistake .&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 25 Jul 2017 02:10:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/How-to-change-string-variable-11-May-2008-to-date/m-p/378835#M3098</guid>
      <dc:creator>Lauban</dc:creator>
      <dc:date>2017-07-25T02:10:05Z</dc:date>
    </item>
    <item>
      <title>Re: How to change string variable 11/May/2008 to date?</title>
      <link>https://communities.sas.com/t5/SAS-Studio/How-to-change-string-variable-11-May-2008-to-date/m-p/378836#M3099</link>
      <description>Could you please let us know how is it not working, I mean the reason to provide a better solution.</description>
      <pubDate>Tue, 25 Jul 2017 02:20:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/How-to-change-string-variable-11-May-2008-to-date/m-p/378836#M3099</guid>
      <dc:creator>Jagadishkatam</dc:creator>
      <dc:date>2017-07-25T02:20:47Z</dc:date>
    </item>
    <item>
      <title>Re: How to change string variable 11/May/2008 to date?</title>
      <link>https://communities.sas.com/t5/SAS-Studio/How-to-change-string-variable-11-May-2008-to-date/m-p/378838#M3100</link>
      <description>&lt;P&gt;Seems like the DATE informat can read those values, as long as you only have 3 characters for the month. Just make sure to use a large enough width. &amp;nbsp;If you have strings longer than three characters for the month name then you will probably want to use the ANDTDTE informat instead.&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 _null_;
  input string $20. ;
  length informat $20 date 8;
  do informat='date20.','anydtdte20.';
    date=inputn(string,informat);
    put informat= date= date9. ;
  end;
cards;
02 / Nov / 2007
;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;PRE&gt;informat=date20. date=02NOV2007
informat=anydtdte20. date=02NOV2007
&lt;/PRE&gt;
&lt;P&gt;Not sure why you would want to display using mmddyy format as that is just asking for confusion when trying to communicate with people in the EU. &amp;nbsp;Why not use YYMMDD format instead so that nobody confusing Dec 10th for Oct 12th. &amp;nbsp;or use DATE9 since then the month is displayed using letters so again you cannot get confused about which number is the month and which is the day.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 25 Jul 2017 02:22:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/How-to-change-string-variable-11-May-2008-to-date/m-p/378838#M3100</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2017-07-25T02:22:43Z</dc:date>
    </item>
    <item>
      <title>Re: How to change string variable 11/May/2008 to date?</title>
      <link>https://communities.sas.com/t5/SAS-Studio/How-to-change-string-variable-11-May-2008-to-date/m-p/378839#M3101</link>
      <description>&lt;P&gt;Hi Jagadishkatam, I inputted&lt;/P&gt;&lt;P&gt;data VAT.T_FRMIMMUNEtwo;&lt;BR /&gt;set VAT.T_FRMIMMUNE;&lt;BR /&gt;datebloodsmeassured=input(compress(calmappeddov,' /'),date9.);&lt;BR /&gt;format calmappeddov mmddyy10.;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But it did not work. &amp;nbsp;sorry about that. &amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 25 Jul 2017 02:29:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/How-to-change-string-variable-11-May-2008-to-date/m-p/378839#M3101</guid>
      <dc:creator>Lauban</dc:creator>
      <dc:date>2017-07-25T02:29:52Z</dc:date>
    </item>
    <item>
      <title>Re: How to change string variable 11/May/2008 to date?</title>
      <link>https://communities.sas.com/t5/SAS-Studio/How-to-change-string-variable-11-May-2008-to-date/m-p/378841#M3102</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/148030"&gt;@Lauban&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;Hi Jagadishkatam, I inputted&lt;/P&gt;
&lt;P&gt;data VAT.T_FRMIMMUNEtwo;&lt;BR /&gt;set VAT.T_FRMIMMUNE;&lt;BR /&gt;datebloodsmeassured=input(compress(calmappeddov,' /'),date9.);&lt;BR /&gt;format calmappeddov mmddyy10.;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But it did not work. &amp;nbsp;sorry about that. &amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;And did that generate an error? What did the log show?&lt;/P&gt;</description>
      <pubDate>Tue, 25 Jul 2017 02:33:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/How-to-change-string-variable-11-May-2008-to-date/m-p/378841#M3102</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-07-25T02:33:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to change string variable 11/May/2008 to date?</title>
      <link>https://communities.sas.com/t5/SAS-Studio/How-to-change-string-variable-11-May-2008-to-date/m-p/378842#M3103</link>
      <description>&lt;BR /&gt;1 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;&lt;BR /&gt;NOTE: ODS statements in the SAS Studio environment may disable some output features.&lt;BR /&gt;62&lt;BR /&gt;63 data VAT.T_FRMIMMUNEtwo;&lt;BR /&gt;64 set VAT.T_FRMIMMUNE;&lt;BR /&gt;NOTE: Data file VAT.T_FRMIMMUNE.DATA is in a format that is native to another host, or the file encoding does not match the session&lt;BR /&gt;encoding. Cross Environment Data Access will be used, which might require additional CPU resources and might reduce&lt;BR /&gt;performance.&lt;BR /&gt;65 datebloodsmeassured=input(compress(calmappeddov,' /'),date9.);&lt;BR /&gt;66 format calmappeddov mmddyy10.;&lt;BR /&gt;_________&lt;BR /&gt;484&lt;BR /&gt;NOTE 484-185: Format $MMDDYY was not found or could not be loaded.</description>
      <pubDate>Tue, 25 Jul 2017 02:35:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/How-to-change-string-variable-11-May-2008-to-date/m-p/378842#M3103</guid>
      <dc:creator>Lauban</dc:creator>
      <dc:date>2017-07-25T02:35:42Z</dc:date>
    </item>
    <item>
      <title>Changing text string to date</title>
      <link>https://communities.sas.com/t5/SAS-Studio/How-to-change-string-variable-11-May-2008-to-date/m-p/378845#M3106</link>
      <description>&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;I want to change column a (olddate) which has character variables in the format of 11/May/2008 to a newdate column with the date variable with the format MM/DD/YYYY. Thanks in advance!&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 25 Jul 2017 02:54:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/How-to-change-string-variable-11-May-2008-to-date/m-p/378845#M3106</guid>
      <dc:creator>Lauban</dc:creator>
      <dc:date>2017-07-25T02:54:21Z</dc:date>
    </item>
    <item>
      <title>Re: How to change string variable 11/May/2008 to date?</title>
      <link>https://communities.sas.com/t5/SAS-Studio/How-to-change-string-variable-11-May-2008-to-date/m-p/378846#M3104</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;Lauban wrote:&amp;nbsp;
&lt;PRE&gt;1 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
NOTE: ODS statements in the SAS Studio environment may disable some output features.
62
63 data VAT.T_FRMIMMUNEtwo;
64 set VAT.T_FRMIMMUNE;
NOTE: Data file VAT.T_FRMIMMUNE.DATA is in a format that is native to another host, or the file encoding does not match the session
encoding. Cross Environment Data Access will be used, which might require additional CPU resources and might reduce
performance.
65 datebloodsmeassured=input(compress(calmappeddov,' /'),date9.);
66 format calmappeddov mmddyy10.;
                       _________
                       484
NOTE 484-185: Format $MMDDYY was not found or could not be loaded.&lt;/PRE&gt;
&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Looks like it worked to me. You just attached the format to the old variable instead of the new one. &amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Notice the $ that SAS added to the format in the note in the log. That is telling you that the variable you tried to attach the MMDDYY format to was a character varaible instead of numeric variable so SAS kindly decided that meant to attach a character format instead of a numeric format to it, but it couldn't find a character format with that name.&lt;/P&gt;</description>
      <pubDate>Tue, 25 Jul 2017 03:02:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/How-to-change-string-variable-11-May-2008-to-date/m-p/378846#M3104</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2017-07-25T03:02:54Z</dc:date>
    </item>
    <item>
      <title>Re: How to change string variable 11/May/2008 to date?</title>
      <link>https://communities.sas.com/t5/SAS-Studio/How-to-change-string-variable-11-May-2008-to-date/m-p/378849#M3105</link>
      <description>I agree with what &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/159"&gt;@Tom&lt;/a&gt; mentioned that you applied the format to character variable  calmappeddov, instead you should use the variable datebloodsmeassured. Could you please check this</description>
      <pubDate>Tue, 25 Jul 2017 03:17:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/How-to-change-string-variable-11-May-2008-to-date/m-p/378849#M3105</guid>
      <dc:creator>Jagadishkatam</dc:creator>
      <dc:date>2017-07-25T03:17:47Z</dc:date>
    </item>
    <item>
      <title>Re: Changing text string to date</title>
      <link>https://communities.sas.com/t5/SAS-Studio/How-to-change-string-variable-11-May-2008-to-date/m-p/378870#M3107</link>
      <description>&lt;P&gt;Hi &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/148030"&gt;@Lauban&lt;/a&gt;!&lt;/P&gt;
&lt;P&gt;Up to now you have failed to provide example data.&lt;/P&gt;
&lt;P&gt;Use the macro provided in&amp;nbsp;&lt;A href="https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-data-AKA-generate/ta-p/258712" target="_blank"&gt;https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-data-AKA-generate/ta-p/258712&lt;/A&gt; to convert your dataset to a data step that can be posted here (use the 6th or 7th button on top of the posting window for posting code).&lt;/P&gt;
&lt;P&gt;With an exact copy of your data (that's what the macro does), we can give you code that works with it.&lt;/P&gt;</description>
      <pubDate>Tue, 25 Jul 2017 06:05:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/How-to-change-string-variable-11-May-2008-to-date/m-p/378870#M3107</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2017-07-25T06:05:03Z</dc:date>
    </item>
  </channel>
</rss>

