<?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 Date variables via computed columns in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Date-variables-via-computed-columns/m-p/140825#M11281</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm new to SAS and am using SAS Enterprise Guide 4.3.&amp;nbsp; I have a project that produces several outputs based on dates between first of the month and last of the month for the previous month.&amp;nbsp; This will eventually be changed to first of the quarter and last of the quarter. All queries come from one user defined table with text, date and number columns.&amp;nbsp; The outputs are tables of raw data and counts of the data by specific key words.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have hard coded the dates to get the project running, and now I need to change the dates to variables.&amp;nbsp; I'm finding SAS dates quite confusing and am not sure how to write this - I think somehow via computed columns?&amp;nbsp; Can anyone help?&amp;nbsp; I want this to run automatically and without user interaction on the first day of the month to pull information for the previous month.&amp;nbsp; This will later be changed to the first day of the quarter to pull information from the previous quarter.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 12 Nov 2013 22:11:51 GMT</pubDate>
    <dc:creator>SAS_newbie1</dc:creator>
    <dc:date>2013-11-12T22:11:51Z</dc:date>
    <item>
      <title>Date variables via computed columns</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Date-variables-via-computed-columns/m-p/140825#M11281</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm new to SAS and am using SAS Enterprise Guide 4.3.&amp;nbsp; I have a project that produces several outputs based on dates between first of the month and last of the month for the previous month.&amp;nbsp; This will eventually be changed to first of the quarter and last of the quarter. All queries come from one user defined table with text, date and number columns.&amp;nbsp; The outputs are tables of raw data and counts of the data by specific key words.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have hard coded the dates to get the project running, and now I need to change the dates to variables.&amp;nbsp; I'm finding SAS dates quite confusing and am not sure how to write this - I think somehow via computed columns?&amp;nbsp; Can anyone help?&amp;nbsp; I want this to run automatically and without user interaction on the first day of the month to pull information for the previous month.&amp;nbsp; This will later be changed to the first day of the quarter to pull information from the previous quarter.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Nov 2013 22:11:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Date-variables-via-computed-columns/m-p/140825#M11281</guid>
      <dc:creator>SAS_newbie1</dc:creator>
      <dc:date>2013-11-12T22:11:51Z</dc:date>
    </item>
    <item>
      <title>Re: Date variables via computed columns</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Date-variables-via-computed-columns/m-p/140826#M11282</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This question is marked "Assumed Answered".&amp;nbsp; Is it?&amp;nbsp; Did you get what you needed?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can calculate relative dates with a collection of SAS functions: DATE, TODAY, MDY, INTCK, and more.&amp;nbsp; You can also use SAS formats to help "bucket" your data for easy aggregation.&amp;nbsp; The specific solution for you depends on your data and exact query, but I'm sure if you post more details others will offer suggestions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;More reading:&lt;/P&gt;&lt;P&gt;&lt;A href="http://blogs.sas.com/content/sasdummy/2011/11/15/do-you-mind-if-we-dance-with-your-dates/" title="http://blogs.sas.com/content/sasdummy/2011/11/15/do-you-mind-if-we-dance-with-your-dates/"&gt;Do you mind if we dance with your DATEs (or DATETIMEs)? - The SAS Dummy&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Chris&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Nov 2013 13:32:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Date-variables-via-computed-columns/m-p/140826#M11282</guid>
      <dc:creator>ChrisHemedinger</dc:creator>
      <dc:date>2013-11-13T13:32:32Z</dc:date>
    </item>
  </channel>
</rss>

