<?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: Informat YEAR was not found or could not be loaded in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Informat-YEAR-was-not-found-or-could-not-be-loaded/m-p/943214#M45204</link>
    <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/76331"&gt;@alepage&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;How do we use year4.&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;You can use the YEAR4. format specification with a numeric variable that contains date values.&lt;/P&gt;
&lt;P&gt;Example:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data test;
   today=date();
   today_year = today;
   year_number=year(today);
   year_string=put(today,year4.);
   format today yymmdd10. today_year year4. ;
run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Tom_0-1725911414673.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/100130iB4315268494CFC3F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Tom_0-1725911414673.png" alt="Tom_0-1725911414673.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Remember:&amp;nbsp; FORMATS convert values into TEXT.&amp;nbsp; INFORMATS convert TEXT into values.&lt;/P&gt;</description>
    <pubDate>Mon, 09 Sep 2024 19:50:49 GMT</pubDate>
    <dc:creator>Tom</dc:creator>
    <dc:date>2024-09-09T19:50:49Z</dc:date>
    <item>
      <title>Informat YEAR was not found or could not be loaded</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Informat-YEAR-was-not-found-or-could-not-be-loaded/m-p/943198#M45200</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am not able to use the format Year or may be I don't use it properly.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data test;
yearstr='2024';
year=input(yearstr, year4.);
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;29 data test;&lt;BR /&gt;30 yearstr='2024';&lt;BR /&gt;31 year=input(yearstr, year4.);&lt;BR /&gt;______&lt;BR /&gt;485&lt;BR /&gt;NOTE 485-185: Informat YEAR was not found or could not be loaded.&lt;/P&gt;</description>
      <pubDate>Mon, 09 Sep 2024 18:30:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Informat-YEAR-was-not-found-or-could-not-be-loaded/m-p/943198#M45200</guid>
      <dc:creator>alepage</dc:creator>
      <dc:date>2024-09-09T18:30:42Z</dc:date>
    </item>
    <item>
      <title>Re: Informat YEAR was not found or could not be loaded</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Informat-YEAR-was-not-found-or-could-not-be-loaded/m-p/943199#M45201</link>
      <description>&lt;P&gt;There is no informat YEAR.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can just convert '2024' to a number with the 4. informat. Of course, this brings up the question why 2024 is a character string, years should be numeric!&lt;/P&gt;</description>
      <pubDate>Mon, 09 Sep 2024 18:41:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Informat-YEAR-was-not-found-or-could-not-be-loaded/m-p/943199#M45201</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2024-09-09T18:41:55Z</dc:date>
    </item>
    <item>
      <title>Re: Informat YEAR was not found or could not be loaded</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Informat-YEAR-was-not-found-or-could-not-be-loaded/m-p/943204#M45202</link>
      <description>&lt;P&gt;With INPUT you are attempting to use an INFORMAT, not Format, typically converting text to numeric.&lt;/P&gt;
&lt;P&gt;If you are attempting to create a date variable you would need to provide more information, likely as a longer string and a different Informat or use the MDY function to impute a month and day to go along with your yearstr converted to numeric. Year4. exists as a date format to display just the year portion of a date in 4 digits. While many date formats have a corresponding informat this in not one of them.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The following code creates a date using imputed month of 1, January, and day of month 1 to create a date of 1Jan2024. Then assign the date format YEAR4. as the default display format.&lt;/P&gt;
&lt;PRE&gt;data test;
yearstr='2024';
year=mdy(1,1, input(yearstr, 4.));
format year year4.; /* to use the FORMAT Year*/
run;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 09 Sep 2024 19:52:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Informat-YEAR-was-not-found-or-could-not-be-loaded/m-p/943204#M45202</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2024-09-09T19:52:51Z</dc:date>
    </item>
    <item>
      <title>Re: Informat YEAR was not found or could not be loaded</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Informat-YEAR-was-not-found-or-could-not-be-loaded/m-p/943205#M45203</link>
      <description>How do we use year4.</description>
      <pubDate>Mon, 09 Sep 2024 19:11:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Informat-YEAR-was-not-found-or-could-not-be-loaded/m-p/943205#M45203</guid>
      <dc:creator>alepage</dc:creator>
      <dc:date>2024-09-09T19:11:56Z</dc:date>
    </item>
    <item>
      <title>Re: Informat YEAR was not found or could not be loaded</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Informat-YEAR-was-not-found-or-could-not-be-loaded/m-p/943214#M45204</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/76331"&gt;@alepage&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;How do we use year4.&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;You can use the YEAR4. format specification with a numeric variable that contains date values.&lt;/P&gt;
&lt;P&gt;Example:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data test;
   today=date();
   today_year = today;
   year_number=year(today);
   year_string=put(today,year4.);
   format today yymmdd10. today_year year4. ;
run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Tom_0-1725911414673.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/100130iB4315268494CFC3F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Tom_0-1725911414673.png" alt="Tom_0-1725911414673.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Remember:&amp;nbsp; FORMATS convert values into TEXT.&amp;nbsp; INFORMATS convert TEXT into values.&lt;/P&gt;</description>
      <pubDate>Mon, 09 Sep 2024 19:50:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Informat-YEAR-was-not-found-or-could-not-be-loaded/m-p/943214#M45204</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2024-09-09T19:50:49Z</dc:date>
    </item>
  </channel>
</rss>

