<?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: why week function gives week number 0 for dates from 1.1.2024 to 7.1.2024? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/why-week-function-gives-week-number-0-for-dates-from-1-1-2024-to/m-p/874123#M345336</link>
    <description>&lt;P&gt;Google searches haven't&amp;nbsp; included those descriptors and I have missed them.&lt;/P&gt;&lt;P&gt;Thanks for pointing out the correct solutions!&lt;/P&gt;</description>
    <pubDate>Fri, 05 May 2023 12:51:40 GMT</pubDate>
    <dc:creator>Antero</dc:creator>
    <dc:date>2023-05-05T12:51:40Z</dc:date>
    <item>
      <title>why week function gives week number 0 for dates from 1.1.2024 to 7.1.2024?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/why-week-function-gives-week-number-0-for-dates-from-1-1-2024-to/m-p/874118#M345331</link>
      <description>&lt;P&gt;I'm totally confused!&lt;/P&gt;</description>
      <pubDate>Fri, 05 May 2023 12:25:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/why-week-function-gives-week-number-0-for-dates-from-1-1-2024-to/m-p/874118#M345331</guid>
      <dc:creator>Antero</dc:creator>
      <dc:date>2023-05-05T12:25:19Z</dc:date>
    </item>
    <item>
      <title>Re: why week function gives week number 0 for dates from 1.1.2024 to 7.1.2024?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/why-week-function-gives-week-number-0-for-dates-from-1-1-2024-to/m-p/874119#M345332</link>
      <description>&lt;P&gt;It does not:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;1    data _null_;
2    do date = '1jan2024'd to '7jan2024'd;
3      week_u=week(date, 'u');
4      week_v=week(date, 'v');
5      week_w=week(date, 'w');
6      format date yymmdd10.;
7      put (_ALL_) (=);
8    end;
9    run;

date=2024-01-01 week_u=0 week_v=1 week_w=1
date=2024-01-02 week_u=0 week_v=1 week_w=1
date=2024-01-03 week_u=0 week_v=1 week_w=1
date=2024-01-04 week_u=0 week_v=1 week_w=1
date=2024-01-05 week_u=0 week_v=1 week_w=1
date=2024-01-06 week_u=0 week_v=1 week_w=1
date=2024-01-07 week_u=1 week_v=1 week_w=1
NOTE: DATA statement used (Total process time):
      real time           0.01 seconds
      cpu time            0.01 seconds
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Did you read &lt;STRONG&gt;&lt;A href="https://documentation.sas.com/doc/en/vdmmlcdc/8.1/casfedsql/n09mp3mz73ue0un16gmazw40der7.htm" target="_self"&gt;documentation for week()&lt;/A&gt;&lt;/STRONG&gt;?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Bart&lt;/P&gt;</description>
      <pubDate>Fri, 05 May 2023 12:31:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/why-week-function-gives-week-number-0-for-dates-from-1-1-2024-to/m-p/874119#M345332</guid>
      <dc:creator>yabwon</dc:creator>
      <dc:date>2023-05-05T12:31:52Z</dc:date>
    </item>
    <item>
      <title>Re: why week function gives week number 0 for dates from 1.1.2024 to 7.1.2024?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/why-week-function-gives-week-number-0-for-dates-from-1-1-2024-to/m-p/874120#M345333</link>
      <description>&lt;P&gt;The &lt;A href="https://documentation.sas.com/doc/en/pgmmvacdc/9.4/lefunctionsref/n1ka2ulrvrjlasn0z7beco2yrgas.htm#n1wfs8cpj0i7man1nx1f53cgg959" target="_self"&gt;documentation&lt;/A&gt; explains it clearly&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;SPAN&gt;The WEEK function with the U descriptor reads a SAS date value and returns the number of the week within the year. The number-of-the-week value is represented as a decimal number in the range 0–53, with a leading zero and maximum value of 53. Week 0 means that the first day of the week occurs in the preceding year. The fifth week of the year is represented as 05.&lt;/SPAN&gt;&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;</description>
      <pubDate>Fri, 05 May 2023 12:32:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/why-week-function-gives-week-number-0-for-dates-from-1-1-2024-to/m-p/874120#M345333</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2023-05-05T12:32:20Z</dc:date>
    </item>
    <item>
      <title>Re: why week function gives week number 0 for dates from 1.1.2024 to 7.1.2024?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/why-week-function-gives-week-number-0-for-dates-from-1-1-2024-to/m-p/874123#M345336</link>
      <description>&lt;P&gt;Google searches haven't&amp;nbsp; included those descriptors and I have missed them.&lt;/P&gt;&lt;P&gt;Thanks for pointing out the correct solutions!&lt;/P&gt;</description>
      <pubDate>Fri, 05 May 2023 12:51:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/why-week-function-gives-week-number-0-for-dates-from-1-1-2024-to/m-p/874123#M345336</guid>
      <dc:creator>Antero</dc:creator>
      <dc:date>2023-05-05T12:51:40Z</dc:date>
    </item>
    <item>
      <title>Re: why week function gives week number 0 for dates from 1.1.2024 to 7.1.2024?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/why-week-function-gives-week-number-0-for-dates-from-1-1-2024-to/m-p/874138#M345343</link>
      <description>&lt;P&gt;Start here : &lt;A href="https://documentation.sas.com/?cdcId=pgmsascdc&amp;amp;cdcVersion=9.4_3.4&amp;amp;docsetId=pgmsashome&amp;amp;docsetTarget=home.htm&amp;amp;locale=en"&gt;https://documentation.sas.com/?cdcId=pgmsascdc&amp;amp;cdcVersion=9.4_3.4&amp;amp;docsetId=pgmsashome&amp;amp;docsetTarget=home.htm&amp;amp;locale=en&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And search within the SAS documentation.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Depending on your install the online help could be quite extensive and no reason to "google".&lt;/P&gt;</description>
      <pubDate>Fri, 05 May 2023 14:15:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/why-week-function-gives-week-number-0-for-dates-from-1-1-2024-to/m-p/874138#M345343</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2023-05-05T14:15:00Z</dc:date>
    </item>
  </channel>
</rss>

