<?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: Week Format in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Week-Format/m-p/542875#M150054</link>
    <description>Have a look at this post: &lt;A href="https://communities.sas.com/t5/SAS-Procedures/How-to-get-the-first-day-of-a-week/td-p/131859" target="_blank"&gt;https://communities.sas.com/t5/SAS-Procedures/How-to-get-the-first-day-of-a-week/td-p/131859&lt;/A&gt;</description>
    <pubDate>Wed, 13 Mar 2019 16:41:33 GMT</pubDate>
    <dc:creator>JosvanderVelden</dc:creator>
    <dc:date>2019-03-13T16:41:33Z</dc:date>
    <item>
      <title>Week Format</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Week-Format/m-p/542838#M150030</link>
      <description>&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm using the WEEK function and I get a column that has 0-53.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there a format that I can apply to have it read:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1 = 1/7/19 - 1/13/19&lt;/P&gt;&lt;P&gt;2 = 1/14/19 - 1/20/19&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Henry&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 13 Mar 2019 15:44:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Week-Format/m-p/542838#M150030</guid>
      <dc:creator>hwangnyc</dc:creator>
      <dc:date>2019-03-13T15:44:26Z</dc:date>
    </item>
    <item>
      <title>Re: Week Format</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Week-Format/m-p/542875#M150054</link>
      <description>Have a look at this post: &lt;A href="https://communities.sas.com/t5/SAS-Procedures/How-to-get-the-first-day-of-a-week/td-p/131859" target="_blank"&gt;https://communities.sas.com/t5/SAS-Procedures/How-to-get-the-first-day-of-a-week/td-p/131859&lt;/A&gt;</description>
      <pubDate>Wed, 13 Mar 2019 16:41:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Week-Format/m-p/542875#M150054</guid>
      <dc:creator>JosvanderVelden</dc:creator>
      <dc:date>2019-03-13T16:41:33Z</dc:date>
    </item>
    <item>
      <title>Re: Week Format</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Week-Format/m-p/542906#M150059</link>
      <description>&lt;P&gt;The week function for a specific year can be adjusted to do this using the V modifier which starts a week on Monday.&lt;/P&gt;
&lt;P&gt;However the function also considers the week 1&amp;nbsp;as the week that includes both January 4 &lt;STRONG&gt;and&lt;/STRONG&gt; the first Thursday.&lt;/P&gt;
&lt;P&gt;For 2019 this does what you request but is not a generic solution because you have not specified what your rule might be for other years:&lt;/P&gt;
&lt;PRE&gt;data example;
   do date='01JAN2019'd to '31DEC2019'd;
      week = week(date,'V') -1;
      output;
   end;
   format date date9.;
run;&lt;/PRE&gt;</description>
      <pubDate>Wed, 13 Mar 2019 17:57:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Week-Format/m-p/542906#M150059</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2019-03-13T17:57:16Z</dc:date>
    </item>
  </channel>
</rss>

