<?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: Cannot load date formats in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Cannot-load-date-formats/m-p/286221#M58669</link>
    <description>&lt;P&gt;This is weird. Your formats look like predefined ones. his can happen if the assumption about the datatype is wrong. A reference to a numeric format associated to a charcater variable can get prepended with a $, leading to a not-found message but I wonder if that's the case here.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can you provide a proc contents and ssome sample records of the input dataset? Also the actual log contents would be helpful.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Worst case you have an issue with your SAS installation. What directories make up your SASHELP library?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;A simple test can tell a lot. Please run:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_;
    d='21JUL2016'd; 
    put d= mmddyy10.;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;The expected result would be:&lt;/P&gt;
&lt;PRE&gt;d=07/21/2016&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards.&lt;/P&gt;
&lt;P&gt;- Jan.&lt;/P&gt;</description>
    <pubDate>Thu, 21 Jul 2016 19:06:54 GMT</pubDate>
    <dc:creator>jklaverstijn</dc:creator>
    <dc:date>2016-07-21T19:06:54Z</dc:date>
    <item>
      <title>Cannot load date formats</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Cannot-load-date-formats/m-p/286215#M58667</link>
      <description>&lt;P&gt;I am trying to convert date values that are currently stored in character format to numeric with a date format, but no matter how I try to code it I get an error saying:&amp;nbsp;ERROR 48-59: The format XXXXX&amp;nbsp;was not found or could not be loaded.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have tried using it in a data&amp;nbsp;step&amp;nbsp;with a format statement:&lt;/P&gt;&lt;P&gt;data new; set old;&lt;/P&gt;&lt;P&gt;format datevar mmddyy10.;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have tried using an input statement to convert it to numeric first.&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;data new; set old;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;date2=input(datevar, mmddyy10.);&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have also tried multiple different date formats (date9, mmddyy10, and datetime20).&amp;nbsp;No matter what I do or what date variable I use, I get the message. I'm not trying to use a user-defined date format&amp;nbsp;so I don't know what's going on.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Jul 2016 18:49:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Cannot-load-date-formats/m-p/286215#M58667</guid>
      <dc:creator>csanfor2</dc:creator>
      <dc:date>2016-07-21T18:49:04Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot load date formats</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Cannot-load-date-formats/m-p/286221#M58669</link>
      <description>&lt;P&gt;This is weird. Your formats look like predefined ones. his can happen if the assumption about the datatype is wrong. A reference to a numeric format associated to a charcater variable can get prepended with a $, leading to a not-found message but I wonder if that's the case here.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can you provide a proc contents and ssome sample records of the input dataset? Also the actual log contents would be helpful.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Worst case you have an issue with your SAS installation. What directories make up your SASHELP library?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;A simple test can tell a lot. Please run:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_;
    d='21JUL2016'd; 
    put d= mmddyy10.;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;The expected result would be:&lt;/P&gt;
&lt;PRE&gt;d=07/21/2016&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards.&lt;/P&gt;
&lt;P&gt;- Jan.&lt;/P&gt;</description>
      <pubDate>Thu, 21 Jul 2016 19:06:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Cannot-load-date-formats/m-p/286221#M58669</guid>
      <dc:creator>jklaverstijn</dc:creator>
      <dc:date>2016-07-21T19:06:54Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot load date formats</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Cannot-load-date-formats/m-p/286226#M58670</link>
      <description>&lt;P&gt;I bet that if you posted from the log that the error is different then you say. I will bet that the actual error is:&lt;/P&gt;
&lt;P&gt;NOTE 484-185: Format $MMDDYY was not found or could not be loaded.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Note the $. Your date variable is character so any format associated with a character variable would start with $.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You need to create a numeric date valued variable to apply the format:&lt;/P&gt;
&lt;P&gt;You did not state the current appearance of your date variable so I am recommending the informat which will read many character values.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;date new;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; set old;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; NewDatevar= input(datevar,anydtdte32.);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; Format newdatevar mmddyy10.;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Jul 2016 19:33:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Cannot-load-date-formats/m-p/286226#M58670</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2016-07-21T19:33:51Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot load date formats</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Cannot-load-date-formats/m-p/286261#M58673</link>
      <description>&lt;P&gt;Ok, forgive me this is going to get a little long because I have several screen shots.&lt;/P&gt;&lt;P&gt;First Jan, I tried your test code and it was successful:&lt;/P&gt;&lt;P&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/4170i9D1BE38512A37996/image-size/original?v=v2&amp;amp;px=-1" border="0" alt="test.png" title="test.png" width="299" height="97" /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here are some sample lines of data:&lt;/P&gt;&lt;P&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/4173i7D193956B1790E85/image-size/original?v=v2&amp;amp;px=-1" border="0" alt="sample data.png" title="sample data.png" /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here are the log contents when I try to run the code a few different ways:&lt;/P&gt;&lt;P&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/4171iD407510C962601FE/image-size/original?v=v2&amp;amp;px=-1" border="0" alt="attempt1.png" title="attempt1.png" /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/4172i664B98C2790D3737/image-size/original?v=v2&amp;amp;px=-1" border="0" alt="Attempt2.png" title="Attempt2.png" /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is the proc contents:&lt;/P&gt;&lt;P&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/4174i763B3B1C9202A44C/image-size/original?v=v2&amp;amp;px=-1" border="0" alt="contents1.png" title="contents1.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/4175i2E1F06845181FFD4/image-size/original?v=v2&amp;amp;px=-1" border="0" alt="contents2.png" title="contents2.png" /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Jul 2016 20:19:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Cannot-load-date-formats/m-p/286261#M58673</guid>
      <dc:creator>csanfor2</dc:creator>
      <dc:date>2016-07-21T20:19:12Z</dc:date>
    </item>
  </channel>
</rss>

