<?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: Yesterdays date in SAS Data Management</title>
    <link>https://communities.sas.com/t5/SAS-Data-Management/Yesterdays-date/m-p/713855#M19762</link>
    <description>&lt;P&gt;%LET START = TODAY(SYSDATE,'DD-MON-RR') -1;&lt;/P&gt;&lt;P&gt;proc sql;&lt;BR /&gt;create table Unsigned as&lt;BR /&gt;select *&lt;BR /&gt;from connection to odbc (&lt;BR /&gt;select&lt;BR /&gt;*&lt;BR /&gt;where&lt;BR /&gt;(DateDrafted = &amp;amp;START)&lt;BR /&gt;);&lt;BR /&gt;run;&lt;/P&gt;</description>
    <pubDate>Mon, 25 Jan 2021 08:53:02 GMT</pubDate>
    <dc:creator>Citrine10</dc:creator>
    <dc:date>2021-01-25T08:53:02Z</dc:date>
    <item>
      <title>Yesterdays date</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Yesterdays-date/m-p/713838#M19755</link>
      <description>&lt;P&gt;hi there&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;how to I define in my where clause to get yesterdays date?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For example in SQL it would be 'where DateBought = (getdate() - 1)'&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;what would be the getdate() equivalent in SAS?&lt;/P&gt;</description>
      <pubDate>Mon, 25 Jan 2021 07:57:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Yesterdays-date/m-p/713838#M19755</guid>
      <dc:creator>Citrine10</dc:creator>
      <dc:date>2021-01-25T07:57:31Z</dc:date>
    </item>
    <item>
      <title>Re: Yesterdays date</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Yesterdays-date/m-p/713840#M19756</link>
      <description>&lt;P&gt;The &lt;A href="https://documentation.sas.com/?cdcId=pgmsascdc&amp;amp;cdcVersion=9.4_3.5&amp;amp;docsetId=lefunctionsref&amp;amp;docsetTarget=p0hm9egy8s7mokn1mz0yxng80ax5.htm&amp;amp;locale=en" target="_self"&gt;Today Function&lt;/A&gt;.&lt;/P&gt;</description>
      <pubDate>Mon, 25 Jan 2021 07:59:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Yesterdays-date/m-p/713840#M19756</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2021-01-25T07:59:04Z</dc:date>
    </item>
    <item>
      <title>Re: Yesterdays date</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Yesterdays-date/m-p/713842#M19757</link>
      <description>&lt;P&gt;already tried that. doesnt work&lt;/P&gt;</description>
      <pubDate>Mon, 25 Jan 2021 08:02:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Yesterdays-date/m-p/713842#M19757</guid>
      <dc:creator>Citrine10</dc:creator>
      <dc:date>2021-01-25T08:02:26Z</dc:date>
    </item>
    <item>
      <title>Re: Yesterdays date</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Yesterdays-date/m-p/713844#M19758</link>
      <description>&lt;P&gt;Please elaborate on 'doesn't work'?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This gives you todays and yesterdays date.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_;
   today = today();
   yesterday = today() - 1;
   put today= date9. yesterday= date9.;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 25 Jan 2021 08:05:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Yesterdays-date/m-p/713844#M19758</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2021-01-25T08:05:56Z</dc:date>
    </item>
    <item>
      <title>Re: Yesterdays date</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Yesterdays-date/m-p/713848#M19759</link>
      <description>ERROR: CLI describe error: [SAS][ODBC SQL Server Wire Protocol driver][Microsoft SQL Server]'today' is not a recognized built-in&lt;BR /&gt;function name. : [SAS][ODBC SQL Server Wire Protocol driver][Microsoft SQL Server]The batch could not be analyzed because of&lt;BR /&gt;compile errors.</description>
      <pubDate>Mon, 25 Jan 2021 08:22:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Yesterdays-date/m-p/713848#M19759</guid>
      <dc:creator>Citrine10</dc:creator>
      <dc:date>2021-01-25T08:22:14Z</dc:date>
    </item>
    <item>
      <title>Re: Yesterdays date</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Yesterdays-date/m-p/713850#M19760</link>
      <description>&lt;P&gt;I'm trying to do it in a proc sql;&lt;/P&gt;</description>
      <pubDate>Mon, 25 Jan 2021 08:27:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Yesterdays-date/m-p/713850#M19760</guid>
      <dc:creator>Citrine10</dc:creator>
      <dc:date>2021-01-25T08:27:48Z</dc:date>
    </item>
    <item>
      <title>Re: Yesterdays date</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Yesterdays-date/m-p/713851#M19761</link>
      <description>&lt;P&gt;Show your SQL Code please.&lt;/P&gt;</description>
      <pubDate>Mon, 25 Jan 2021 08:40:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Yesterdays-date/m-p/713851#M19761</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2021-01-25T08:40:07Z</dc:date>
    </item>
    <item>
      <title>Re: Yesterdays date</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Yesterdays-date/m-p/713855#M19762</link>
      <description>&lt;P&gt;%LET START = TODAY(SYSDATE,'DD-MON-RR') -1;&lt;/P&gt;&lt;P&gt;proc sql;&lt;BR /&gt;create table Unsigned as&lt;BR /&gt;select *&lt;BR /&gt;from connection to odbc (&lt;BR /&gt;select&lt;BR /&gt;*&lt;BR /&gt;where&lt;BR /&gt;(DateDrafted = &amp;amp;START)&lt;BR /&gt;);&lt;BR /&gt;run;&lt;/P&gt;</description>
      <pubDate>Mon, 25 Jan 2021 08:53:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Yesterdays-date/m-p/713855#M19762</guid>
      <dc:creator>Citrine10</dc:creator>
      <dc:date>2021-01-25T08:53:02Z</dc:date>
    </item>
    <item>
      <title>Re: Yesterdays date</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Yesterdays-date/m-p/713857#M19763</link>
      <description>&lt;P&gt;So you are doing an explicit pass-through to MS SQL Server via ODBC.&lt;/P&gt;
&lt;P&gt;This means that you need to use the SQL Server functions (and math) in the pass-through.&lt;/P&gt;
&lt;P&gt;See&amp;nbsp;&lt;A href="https://learnsql.com/cookbook/how-to-get-yesterdays-date-in-t-sql/#:~:text=To%20get%20yesterday's%20date%2C%20you,using%20the%20DATEADD()%20function." target="_blank" rel="noopener"&gt;here&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;(first result of a Google search for "ms sql server get yesterday's date", see Maxim 6)&lt;/P&gt;</description>
      <pubDate>Mon, 25 Jan 2021 10:21:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Yesterdays-date/m-p/713857#M19763</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2021-01-25T10:21:06Z</dc:date>
    </item>
  </channel>
</rss>

