<?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: How to use date/time field  with a minus 1 day in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/How-to-use-date-time-field-with-a-minus-1-day/m-p/120484#M33219</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Beto.&lt;/P&gt;&lt;P&gt;Verify exemple....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data teste;&lt;/P&gt;&lt;P&gt;data_dia = '04nov2012 00:00:00'dt;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;proc sql;&lt;/P&gt;&lt;P&gt;select datepart(data_dia) format=ddmmyy10., datepart(data_dia -1) format=ddmmyy10. from teste;quit;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For data step exist intnx function... verify&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 08 Nov 2012 02:23:56 GMT</pubDate>
    <dc:creator>Geraldo</dc:creator>
    <dc:date>2012-11-08T02:23:56Z</dc:date>
    <item>
      <title>How to use date/time field  with a minus 1 day</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-use-date-time-field-with-a-minus-1-day/m-p/120482#M33217</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ihave to date formatted&amp;nbsp; diffrently currently when we use the script we just change date to ysterday date. I want to automated and have tried Now(), Date()&amp;nbsp; today()&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-1 but get an error saying function name is not found.&lt;/P&gt;&lt;P&gt;Enclose is&amp;nbsp; snapost of the 2 types of date/time I'm working with&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1)&amp;nbsp; &lt;SPAN style="font-size: 10pt; background: white; color: blue; font-family: 'Courier New';"&gt;where &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; background: white; color: black; font-family: 'Courier New';"&gt;Date = {ts&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; background: white; color: purple; font-family: 'Courier New';"&gt;'2012-11-04 00:00:00'&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; background: white; color: black; font-family: 'Courier New';"&gt;}&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="ecxMsoNormal"&gt;&lt;SPAN style="font-size: 10pt; background: white; color: black; font-family: 'Courier New';"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P class="ecxMsoNormal"&gt;&lt;SPAN style="font-size: 10pt; background: white; color: black; font-family: 'Courier New';"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P class="ecxMsoNormal"&gt;&lt;SPAN style="font-size: 10pt; background: white; color: black; font-family: 'Courier New';"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P class="ecxMsoNormal"&gt;&lt;SPAN style="font-size: 10pt; background: white; color: black; font-family: 'Courier New';"&gt; 2)&lt;/SPAN&gt;&lt;STRONG style="color: navy; background: white; font-size: 10pt; font-family: 'Courier New';"&gt;proc&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt; background: white; color: black; font-family: 'Courier New';"&gt; &lt;/SPAN&gt;&lt;STRONG style="color: navy; background: white; font-size: 10pt; font-family: 'Courier New';"&gt;sql&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt; background: white; color: black; font-family: 'Courier New';"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="ecxMsoNormal"&gt;&lt;SPAN style="font-size: 10pt; background: white; color: blue; font-family: 'Courier New';"&gt;CREATE&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; background: white; color: black; font-family: 'Courier New';"&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; background: white; color: blue; font-family: 'Courier New';"&gt;TABLE&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; background: white; color: black; font-family: 'Courier New';"&gt; Part2 &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; background: white; color: blue; font-family: 'Courier New';"&gt;AS&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; background: white; color: black; font-family: 'Courier New';"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P class="ecxMsoNormal"&gt;&lt;SPAN style="font-size: 10pt; background: white; color: black; font-family: 'Courier New';"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; background: white; color: blue; font-family: 'Courier New';"&gt;SELECT&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; background: white; color: black; font-family: 'Courier New';"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P class="ecxMsoNormal"&gt;&lt;SPAN style="font-size: 10pt; background: white; color: black; font-family: 'Courier New';"&gt;AtmCodeNumber,&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="ecxMsoNormal"&gt;&lt;SPAN style="font-size: 10pt; background: white; color: black; font-family: 'Courier New';"&gt;CurrInitAmt &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; background: white; color: blue; font-family: 'Courier New';"&gt;AS&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; background: white; color: black; font-family: 'Courier New';"&gt; Initialized,&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="ecxMsoNormal"&gt;&lt;SPAN style="font-size: 10pt; background: white; color: black; font-family: 'Courier New';"&gt;TranDate&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="ecxMsoNormal"&gt;&lt;SPAN style="font-size: 10pt; background: white; color: blue; font-family: 'Courier New';"&gt;FROM&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; background: white; color: black; font-family: 'Courier New';"&gt; sql.Hist &lt;/SPAN&gt;&lt;/P&gt;&lt;P class="ecxMsoNormal"&gt;&lt;SPAN style="font-size: 10pt; background: white; color: blue; font-family: 'Courier New';"&gt;and&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; background: white; color: black; font-family: 'Courier New';"&gt; TranDate = &lt;/SPAN&gt;&lt;STRONG style="color: teal; background: white; font-size: 10pt; font-family: 'Courier New';"&gt;'04Nov2012:00:00:00'dt&lt;/STRONG&gt;&lt;/P&gt;&lt;P class="ecxMsoNormal"&gt;&lt;SPAN style="font-size: 10pt; background: white; color: blue; font-family: 'Courier New';"&gt;and&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; background: white; color: black; font-family: 'Courier New';"&gt; CurrInitAmt NE &lt;/SPAN&gt;&lt;STRONG style="color: teal; background: white; font-size: 10pt; font-family: 'Courier New';"&gt;0&lt;/STRONG&gt;&lt;/P&gt;&lt;P class="ecxMsoNormal"&gt;&lt;SPAN style="font-size: 10pt; background: white; color: blue; font-family: 'Courier New';"&gt;GROUP&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; background: white; color: black; font-family: 'Courier New';"&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; background: white; color: blue; font-family: 'Courier New';"&gt;BY&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; background: white; color: black; font-family: 'Courier New';"&gt; AtmCodeNumber,TranDate&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="ecxMsoNormal"&gt;&lt;SPAN style="font-size: 10pt; background: white; color: black; font-family: 'Courier New';"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P class="ecxMsoNormal"&gt;&lt;SPAN style="font-size: 10pt; background: white; color: black; font-family: 'Courier New';"&gt;);&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="ecxMsoNormal"&gt;&lt;STRONG style="color: navy; background: white; font-size: 10pt; font-family: 'Courier New';"&gt;run&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt; background: white; color: black; font-family: 'Courier New';"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="ecxMsoNormal"&gt;&lt;/P&gt;&lt;P class="ecxMsoNormal"&gt;&lt;SPAN style="font-size: 10pt; background: white; color: black; font-family: 'Courier New';"&gt;Thank you again for your assitance&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Nov 2012 00:14:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-use-date-time-field-with-a-minus-1-day/m-p/120482#M33217</guid>
      <dc:creator>BETO</dc:creator>
      <dc:date>2012-11-08T00:14:37Z</dc:date>
    </item>
    <item>
      <title>Re: How to use date/time field  with a minus 1 day</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-use-date-time-field-with-a-minus-1-day/m-p/120483#M33218</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;We are going to need a bit more information here.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I do not see the DATE() or TODAY() function in your code. Those functions exist and should be available so there is something else going on.&amp;nbsp; I am unfamiliar with the NOW() function.&lt;/P&gt;&lt;P&gt;How are you attempting to use the date string&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 10pt;"&gt;where &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt;"&gt;Date = {ts&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: purple; font-size: 10pt;"&gt;'2012-11-04 00:00:00'&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt;"&gt;} &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt;"&gt;?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;This is not a SAS date constant is it a DB2 date? Are you attempting a SQL pass-thru?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What error are you getting in your SQL step?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To answer your primary question; SAS dates are stored as numeric displacement values (number of days since 1jan1960).&amp;nbsp; So yesterday's date is a subtraction.&lt;/P&gt;&lt;P&gt;yesterday = today() - 1;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Nov 2012 00:44:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-use-date-time-field-with-a-minus-1-day/m-p/120483#M33218</guid>
      <dc:creator>ArtC</dc:creator>
      <dc:date>2012-11-08T00:44:15Z</dc:date>
    </item>
    <item>
      <title>Re: How to use date/time field  with a minus 1 day</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-use-date-time-field-with-a-minus-1-day/m-p/120484#M33219</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Beto.&lt;/P&gt;&lt;P&gt;Verify exemple....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data teste;&lt;/P&gt;&lt;P&gt;data_dia = '04nov2012 00:00:00'dt;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;proc sql;&lt;/P&gt;&lt;P&gt;select datepart(data_dia) format=ddmmyy10., datepart(data_dia -1) format=ddmmyy10. from teste;quit;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For data step exist intnx function... verify&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Nov 2012 02:23:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-use-date-time-field-with-a-minus-1-day/m-p/120484#M33219</guid>
      <dc:creator>Geraldo</dc:creator>
      <dc:date>2012-11-08T02:23:56Z</dc:date>
    </item>
    <item>
      <title>Re: How to use date/time field  with a minus 1 day</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-use-date-time-field-with-a-minus-1-day/m-p/120485#M33220</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P class="ecxMsoNormal"&gt;&lt;SPAN style="font-size: 10pt; background: white; color: blue; font-family: 'Courier New';"&gt;Here is my code&amp;nbsp; with errors message.. The 1st table works as the data step. The issue is when&amp;nbsp; to select today date minus 1 or 3 &lt;/SPAN&gt;&lt;/P&gt;&lt;P class="ecxMsoNormal"&gt;&lt;SPAN style="font-size: 10pt; background: white; color: blue; font-family: 'Courier New';"&gt;options&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; background: white; color: black; font-family: 'Courier New';"&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; background: white; color: blue; font-family: 'Courier New';"&gt;symbolgen&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; background: white; color: black; font-family: 'Courier New';"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="ecxMsoNormal"&gt;&lt;/P&gt;&lt;P class="ecxMsoNormal"&gt;&lt;SPAN style="font-size: 10pt; background: white; color: blue; font-family: 'Courier New';"&gt;%LET&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; background: white; color: black; font-family: 'Courier New';"&gt; START = TODAY(SYSDATE,'DD-MON-RR') -3;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="ecxMsoNormal"&gt;&lt;SPAN style="font-size: 10pt; background: white; color: black; font-family: 'Courier New';"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P class="ecxMsoNormal"&gt;&lt;SPAN style="font-size: 10pt; background: white; color: black; font-family: 'Courier New';"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P class="ecxMsoNormal"&gt;&lt;STRONG style="color: navy; background: white; font-size: 10pt; font-family: 'Courier New';"&gt;proc&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt; background: white; color: black; font-family: 'Courier New';"&gt; &lt;/SPAN&gt;&lt;STRONG style="color: navy; background: white; font-size: 10pt; font-family: 'Courier New';"&gt;sql&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt; background: white; color: black; font-family: 'Courier New';"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="ecxMsoNormal"&gt;&lt;SPAN style="font-size: 10pt; background: white; color: blue; font-family: 'Courier New';"&gt;CREATE&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; background: white; color: black; font-family: 'Courier New';"&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; background: white; color: blue; font-family: 'Courier New';"&gt;TABLE&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; background: white; color: black; font-family: 'Courier New';"&gt; Part1 &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; background: white; color: blue; font-family: 'Courier New';"&gt;AS&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; background: white; color: black; font-family: 'Courier New';"&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; background: white; color: blue; font-family: 'Courier New';"&gt;select&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; background: white; color: black; font-family: 'Courier New';"&gt; * &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; background: white; color: blue; font-family: 'Courier New';"&gt;from&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; background: white; color: black; font-family: 'Courier New';"&gt; connection to ODBC&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="ecxMsoNormal"&gt;&lt;SPAN style="font-size: 10pt; background: white; color: black; font-family: 'Courier New';"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; background: white; color: blue; font-family: 'Courier New';"&gt;SELECT&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; background: white; color: black; font-family: 'Courier New';"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P class="ecxMsoNormal"&gt;&lt;/P&gt;&lt;P class="ecxMsoNormal"&gt;&lt;SPAN style="font-size: 10pt; background: white; color: black; font-family: 'Courier New';"&gt;Date, &lt;/SPAN&gt;&lt;/P&gt;&lt;P class="ecxMsoNormal"&gt;&lt;SPAN style="font-size: 10pt; background: white; color: black; font-family: 'Courier New';"&gt;CodeNumber,&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="ecxMsoNormal"&gt;&lt;SPAN style="font-size: 10pt; background: white; color: black; font-family: 'Courier New';"&gt;&lt;SPAN style="font-size: 10pt; background: white; color: black; font-family: 'Courier New';"&gt;Sum(A&lt;/SPAN&gt;mount) &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; background: white; color: blue; font-family: 'Courier New';"&gt;AS&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; background: white; color: black; font-family: 'Courier New';"&gt; ReplenAmount&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="ecxMsoNormal"&gt;&lt;SPAN style="font-size: 10pt; background: white; color: blue; font-family: 'Courier New';"&gt;FROM&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; background: white; color: black; font-family: 'Courier New';"&gt; tbVendors &lt;/SPAN&gt;&lt;/P&gt;&lt;P class="ecxMsoNormal"&gt;&lt;SPAN style="font-size: 10pt; background: white; color: blue; font-family: 'Courier New';"&gt;where&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; background: white; color: black; font-family: 'Courier New';"&gt;&lt;SPAN style="font-size: 10pt; background: white; color: black; font-family: 'Courier New';"&gt; DATE &lt;/SPAN&gt;&amp;gt; {ts&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; background: white; color: purple; font-family: 'Courier New';"&gt;'2012-11-04 00:00:00'&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; background: white; color: black; font-family: 'Courier New';"&gt;}&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="ecxMsoNormal"&gt;&lt;SPAN style="font-size: 10pt; background: white; color: blue; font-family: 'Courier New';"&gt;GROUP&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; background: white; color: black; font-family: 'Courier New';"&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; background: white; color: blue; font-family: 'Courier New';"&gt;BY&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; background: white; color: black; font-family: 'Courier New';"&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; background: white; color: black; font-family: 'Courier New';"&gt;Date, cO&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; background: white; color: black; font-family: 'Courier New';"&gt;deNumber,&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; background: white; color: black; font-family: 'Courier New';"&gt;Amount&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="ecxMsoNormal"&gt;&lt;SPAN style="font-size: 10pt; background: white; color: black; font-family: 'Courier New';"&gt;O&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; background: white; color: blue; font-family: 'Courier New';"&gt;RDER&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; background: white; color: black; font-family: 'Courier New';"&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; background: white; color: blue; font-family: 'Courier New';"&gt;BY&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; background: white; color: black; font-family: 'Courier New';"&gt;&lt;SPAN style="font-size: 10pt; background: white; color: black; font-family: 'Courier New';"&gt; &lt;/SPAN&gt;CodeNumber);&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="ecxMsoNormal"&gt;&lt;SPAN style="font-size: 10pt; background: white; color: black; font-family: 'Courier New';"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P class="ecxMsoNormal"&gt;&lt;SPAN style="font-size: 10pt; background: white; color: black; font-family: 'Courier New';"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P class="ecxMsoNormal"&gt;&lt;STRONG style="color: navy; background: white; font-size: 10pt; font-family: 'Courier New';"&gt;Run&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt; background: white; color: black; font-family: 'Courier New';"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="ecxMsoNormal"&gt;&lt;SPAN style="font-size: 10pt; background: white; color: black; font-family: 'Courier New';"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P class="ecxMsoNormal"&gt;&lt;STRONG style="color: navy; background: white; font-size: 10pt; font-family: 'Courier New';"&gt;data&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt; background: white; color: black; font-family: 'Courier New';"&gt; Part1;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="ecxMsoNormal"&gt;&lt;SPAN style="font-size: 10pt; background: white; color: blue; font-family: 'Courier New';"&gt;set&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; background: white; color: black; font-family: 'Courier New';"&gt; Part1;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="ecxMsoNormal"&gt;&lt;SPAN style="font-size: 10pt; background: white; color: black; font-family: 'Courier New';"&gt;date=datepart(ReplenDate);&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="ecxMsoNormal"&gt;&lt;SPAN style="font-size: 10pt; background: white; color: blue; font-family: 'Courier New';"&gt;format&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; background: white; color: black; font-family: 'Courier New';"&gt; date &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; background: white; color: teal; font-family: 'Courier New';"&gt;MMDDYY8.&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; background: white; color: black; font-family: 'Courier New';"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="ecxMsoNormal"&gt;&lt;STRONG style="color: navy; background: white; font-size: 10pt; font-family: 'Courier New';"&gt;run&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt; background: white; color: black; font-family: 'Courier New';"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="ecxMsoNormal"&gt;&lt;SPAN style="font-size: 10pt; background: white; color: black; font-family: 'Courier New';"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P class="ecxMsoNormal"&gt;&lt;SPAN style="font-size: 10pt; background: white; color: black; font-family: 'Courier New';"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P class="ecxMsoNormal"&gt;&lt;SPAN style="font-size: 10pt; background: white; color: black; font-family: 'Courier New';"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P class="ecxMsoNormal"&gt;&lt;STRONG style="color: navy; background: white; font-size: 10pt; font-family: 'Courier New';"&gt;proc&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt; background: white; color: black; font-family: 'Courier New';"&gt; &lt;/SPAN&gt;&lt;STRONG style="color: navy; background: white; font-size: 10pt; font-family: 'Courier New';"&gt;sql&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt; background: white; color: black; font-family: 'Courier New';"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="ecxMsoNormal"&gt;&lt;SPAN style="font-size: 10pt; background: white; color: black; font-family: 'Courier New';"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P class="ecxMsoNormal"&gt;&lt;SPAN style="font-size: 10pt; background: white; color: blue; font-family: 'Courier New';"&gt;CREATE&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; background: white; color: black; font-family: 'Courier New';"&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; background: white; color: blue; font-family: 'Courier New';"&gt;TABLE&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; background: white; color: black; font-family: 'Courier New';"&gt; First &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; background: white; color: blue; font-family: 'Courier New';"&gt;AS&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; background: white; color: black; font-family: 'Courier New';"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P class="ecxMsoNormal"&gt;&lt;SPAN style="font-size: 10pt; background: white; color: black; font-family: 'Courier New';"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; background: white; color: blue; font-family: 'Courier New';"&gt;SELECT&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; background: white; color: black; font-family: 'Courier New';"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P class="ecxMsoNormal"&gt;&lt;SPAN style="font-size: 10pt; background: white; color: black; font-family: 'Courier New';"&gt;Date, &lt;/SPAN&gt;&lt;/P&gt;&lt;P class="ecxMsoNormal"&gt;&lt;SPAN style="font-size: 10pt; background: white; color: black; font-family: 'Courier New';"&gt;CodeNumber,&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="ecxMsoNormal"&gt;&lt;SPAN style="font-size: 10pt; background: white; color: black; font-family: 'Courier New';"&gt;&lt;SPAN style="font-size: 10pt; background: white; color: black; font-family: 'Courier New';"&gt;Sum(A&lt;/SPAN&gt;mount) &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; background: white; color: blue; font-family: 'Courier New';"&gt;AS&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; background: white; color: black; font-family: 'Courier New';"&gt; ReplenAmount&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="ecxMsoNormal"&gt;&lt;SPAN style="font-size: 10pt; background: white; color: blue; font-family: 'Courier New';"&gt;FROM&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; background: white; color: black; font-family: 'Courier New';"&gt; Part1&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="ecxMsoNormal"&gt;&lt;SPAN style="font-size: 10pt; background: white; color: blue; font-family: 'Courier New';"&gt;Where&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; background: white; color: black; font-family: 'Courier New';"&gt; Date &amp;gt;= &amp;amp;START &lt;/SPAN&gt;&lt;/P&gt;&lt;P class="ecxMsoNormal"&gt;&lt;SPAN style="font-size: 10pt; background: white; color: black; font-family: 'Courier New';"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P class="ecxMsoNormal"&gt;&lt;SPAN style="font-size: 10pt; background: white; color: black; font-family: 'Courier New';"&gt;);&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="ecxMsoNormal"&gt;&lt;SPAN style="font-size: 10pt; background: white; color: black; font-family: 'Courier New';"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P class="ecxMsoNormal"&gt;&lt;STRONG style="color: navy; background: white; font-size: 10pt; font-family: 'Courier New';"&gt;Run&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt; background: white; color: black; font-family: 'Courier New';"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="ecxMsoNormal"&gt; &lt;/P&gt;&lt;P class="ecxMsoNormal"&gt;&lt;SPAN style="font-size: 8pt; font-family: 'SAS Monospace';"&gt;ERROR: Function TO_DATE could not be located.&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="ecxMsoNormal"&gt;&lt;SPAN style="font-size: 8pt; font-family: 'SAS Monospace';"&gt;ERROR: Expression using subtraction :smileyminus: requires numeric types.&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="ecxMsoNormal"&gt;&lt;SPAN style="font-size: 8pt; font-family: 'SAS Monospace';"&gt;ERROR: The following columns were not found in the contributing tables: SYSDATE&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Nov 2012 07:07:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-use-date-time-field-with-a-minus-1-day/m-p/120485#M33220</guid>
      <dc:creator>BETO</dc:creator>
      <dc:date>2012-11-08T07:07:37Z</dc:date>
    </item>
    <item>
      <title>Re: How to use date/time field  with a minus 1 day</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-use-date-time-field-with-a-minus-1-day/m-p/120486#M33221</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;As Art already mentioned, your SAS syntax is wrong.&lt;/P&gt;&lt;P&gt;The today function takes no arguments.&lt;/P&gt;&lt;P&gt;Datetime constants as you did in your first post ('&lt;EM&gt;datetime-value&lt;/EM&gt;'dt).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Nov 2012 07:49:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-use-date-time-field-with-a-minus-1-day/m-p/120486#M33221</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2012-11-08T07:49:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to use date/time field  with a minus 1 day</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-use-date-time-field-with-a-minus-1-day/m-p/120487#M33222</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;amp;start will contain yesterday's date if you use:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%let start = %eval(%sysfunc(today())-1);&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Nov 2012 17:39:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-use-date-time-field-with-a-minus-1-day/m-p/120487#M33222</guid>
      <dc:creator>ArtC</dc:creator>
      <dc:date>2012-11-08T17:39:38Z</dc:date>
    </item>
    <item>
      <title>Re: How to use date/time field  with a minus 1 day</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-use-date-time-field-with-a-minus-1-day/m-p/120488#M33223</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P class="ecxMsoNormal"&gt;&lt;STRONG style="color: navy; background: white; font-size: 10pt; font-family: 'Courier New';"&gt;Hi Art,&lt;/STRONG&gt;&lt;/P&gt;&lt;P class="ecxMsoNormal"&gt;&lt;STRONG style="color: navy; background: white; font-size: 10pt; font-family: 'Courier New';"&gt;Thank you so much for your assitance&amp;nbsp; and all who responded . I was able to fig out enclose is what I use&amp;nbsp; &lt;/STRONG&gt;&lt;/P&gt;&lt;P class="ecxMsoNormal"&gt; &lt;/P&gt;&lt;P class="ecxMsoNormal"&gt; &lt;/P&gt;&lt;P class="ecxMsoNormal"&gt;&lt;STRONG style="color: navy; background: white; font-size: 10pt; font-family: 'Courier New';"&gt;data&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt; background: white; color: black; font-family: 'Courier New';"&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; background: white; color: blue; font-family: 'Courier New';"&gt;_null_&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; background: white; color: black; font-family: 'Courier New';"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="ecxMsoNormal"&gt;&lt;SPAN style="font-size: 10pt; background: white; color: black; font-family: 'Courier New';"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P class="ecxMsoNormal"&gt;&lt;SPAN style="font-size: 10pt; background: white; color: blue; font-family: 'Courier New';"&gt;call&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; background: white; color: black; font-family: 'Courier New';"&gt; symput(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; background: white; color: purple; font-family: 'Courier New';"&gt;'yesterday'&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; background: white; color: black; font-family: 'Courier New';"&gt;, &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; background: white; color: purple; font-family: 'Courier New';"&gt;"'"&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; background: white; color: black; font-family: 'Courier New';"&gt;||put(today()-&lt;/SPAN&gt;&lt;STRONG style="color: teal; background: white; font-size: 10pt; font-family: 'Courier New';"&gt;1&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt; background: white; color: black; font-family: 'Courier New';"&gt;, &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; background: white; color: teal; font-family: 'Courier New';"&gt;mmddyy10.&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; background: white; color: black; font-family: 'Courier New';"&gt;)||&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; background: white; color: purple; font-family: 'Courier New';"&gt;"'"&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; background: white; color: black; font-family: 'Courier New';"&gt;);&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="ecxMsoNormal"&gt;&lt;SPAN style="font-size: 10pt; background: white; color: black; font-family: 'Courier New';"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P class="ecxMsoNormal"&gt;&lt;STRONG style="color: navy; background: white; font-size: 10pt; font-family: 'Courier New';"&gt;run&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt; background: white; color: black; font-family: 'Courier New';"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="ecxMsoNormal"&gt; &lt;/P&gt;&lt;P class="ecxMsoNormal"&gt;&lt;STRONG style="font-size: 10pt; background: white; color: navy; font-family: 'Courier New';"&gt;proc&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt; background: white; color: black; font-family: 'Courier New';"&gt; &lt;/SPAN&gt;&lt;STRONG style="font-size: 10pt; background: white; color: navy; font-family: 'Courier New';"&gt;sql&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt; background: white; color: black; font-family: 'Courier New';"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="ecxMsoNormal"&gt;&lt;SPAN style="font-size: 10pt; background: white; color: blue; font-family: 'Courier New';"&gt;CREATE&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; background: white; color: black; font-family: 'Courier New';"&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; background: white; color: blue; font-family: 'Courier New';"&gt;TABLE&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; background: white; color: black; font-family: 'Courier New';"&gt; Part1 &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; background: white; color: blue; font-family: 'Courier New';"&gt;AS&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; background: white; color: black; font-family: 'Courier New';"&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; background: white; color: blue; font-family: 'Courier New';"&gt;select&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; background: white; color: black; font-family: 'Courier New';"&gt; * &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; background: white; color: blue; font-family: 'Courier New';"&gt;from&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; background: white; color: black; font-family: 'Courier New';"&gt; connection to ODBC&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="ecxMsoNormal"&gt;&lt;SPAN style="font-size: 10pt; background: white; color: black; font-family: 'Courier New';"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; background: white; color: blue; font-family: 'Courier New';"&gt;SELECT&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; background: white; color: black; font-family: 'Courier New';"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P class="ecxMsoNormal"&gt;&lt;/P&gt;&lt;P class="ecxMsoNormal"&gt;&lt;SPAN style="font-size: 10pt; background: white; color: black; font-family: 'Courier New';"&gt;Date, &lt;/SPAN&gt;&lt;/P&gt;&lt;P class="ecxMsoNormal"&gt;&lt;SPAN style="font-size: 10pt; background: white; color: black; font-family: 'Courier New';"&gt;CodeNumber,&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="ecxMsoNormal"&gt;&lt;SPAN style="font-size: 10pt; background: white; color: black; font-family: 'Courier New';"&gt;&lt;SPAN style="font-size: 10pt; background: white; color: black; font-family: 'Courier New';"&gt;Sum(A&lt;/SPAN&gt;mount) &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; background: white; color: blue; font-family: 'Courier New';"&gt;AS&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; background: white; color: black; font-family: 'Courier New';"&gt; ReplenAmount&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="ecxMsoNormal"&gt;&lt;SPAN style="font-size: 10pt; background: white; color: blue; font-family: 'Courier New';"&gt;FROM&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; background: white; color: black; font-family: 'Courier New';"&gt; tbVendors &lt;/SPAN&gt;&lt;/P&gt;&lt;P class="ecxMsoNormal"&gt;&lt;SPAN style="font-size: 10pt; background: white; color: blue; font-family: 'Courier New';"&gt;where&lt;/SPAN&gt;&lt;SPAN style="color: black; background: white; font-size: 10pt; font-family: 'Courier New';"&gt; DATE =&amp;amp;yesterday&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="ecxMsoNormal"&gt;&lt;SPAN style="font-size: 10pt; background: white; color: blue; font-family: 'Courier New';"&gt;GROUP&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; background: white; color: black; font-family: 'Courier New';"&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; background: white; color: blue; font-family: 'Courier New';"&gt;BY&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; background: white; color: black; font-family: 'Courier New';"&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; background: white; color: black; font-family: 'Courier New';"&gt;Date, cO&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; background: white; color: black; font-family: 'Courier New';"&gt;deNumber,&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; background: white; color: black; font-family: 'Courier New';"&gt;Amount&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="ecxMsoNormal"&gt;&lt;SPAN style="font-size: 10pt; background: white; color: black; font-family: 'Courier New';"&gt;O&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; background: white; color: blue; font-family: 'Courier New';"&gt;RDER&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; background: white; color: black; font-family: 'Courier New';"&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; background: white; color: blue; font-family: 'Courier New';"&gt;BY&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; background: white; color: black; font-family: 'Courier New';"&gt;&lt;SPAN style="font-size: 10pt; background: white; color: black; font-family: 'Courier New';"&gt; &lt;/SPAN&gt;CodeNumber);&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="ecxMsoNormal"&gt; &lt;/P&gt;&lt;P class="ecxMsoNormal"&gt; &lt;/P&gt;&lt;P class="ecxMsoNormal"&gt;&lt;STRONG style="font-size: 10pt; background: white; color: navy; font-family: 'Courier New';"&gt;Run&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt; background: white; color: black; font-family: 'Courier New';"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Nov 2012 20:30:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-use-date-time-field-with-a-minus-1-day/m-p/120488#M33223</guid>
      <dc:creator>BETO</dc:creator>
      <dc:date>2012-11-08T20:30:57Z</dc:date>
    </item>
    <item>
      <title>Re: How to use date/time field  with a minus 1 day</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-use-date-time-field-with-a-minus-1-day/m-p/120489#M33224</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P class="ecxMsoNormal" style="font-style: inherit; font-family: inherit;"&gt;&lt;STRONG style="font-style: inherit; font-size: 10pt; font-family: 'Courier New'; color: navy; background-color: white;"&gt;Hi beto,&lt;/STRONG&gt;&lt;/P&gt;&lt;P class="ecxMsoNormal" style="font-style: inherit; font-family: inherit;"&gt;&lt;/P&gt;&lt;P class="ecxMsoNormal" style="font-style: inherit; font-family: inherit;"&gt;&lt;/P&gt;&lt;P class="ecxMsoNormal" style="font-style: inherit; font-family: inherit;"&gt;The macro variable no compile/change&amp;nbsp; with ' &lt;/P&gt;&lt;P class="ecxMsoNormal" style="font-style: inherit; font-family: inherit;"&gt;&lt;/P&gt;&lt;P class="ecxMsoNormal" style="font-style: inherit; font-family: inherit;"&gt;change de data step with:&lt;/P&gt;&lt;P class="ecxMsoNormal" style="font-style: inherit; font-family: inherit;"&gt;&lt;STRONG style="font-style: inherit; font-size: 10pt; font-family: 'Courier New'; color: navy; background-color: white;"&gt;data&lt;/STRONG&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: 'Courier New'; background-color: white; color: black;"&gt; &lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: 'Courier New'; background-color: white; color: blue;"&gt;_null_&lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: 'Courier New'; background-color: white; color: black;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="ecxMsoNormal" style="font-style: inherit; font-family: inherit;"&gt; &lt;/P&gt;&lt;P class="ecxMsoNormal" style="font-style: inherit; font-family: inherit;"&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: 'Courier New'; background-color: white; color: blue;"&gt;call&lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: 'Courier New'; background-color: white; color: black;"&gt; symput(&lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: 'Courier New'; background-color: white; color: purple;"&gt;'yesterday'&lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: 'Courier New'; background-color: white; color: black;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: 'Courier New'; background-color: white; color: black;"&gt;put(today()-&lt;/SPAN&gt;&lt;STRONG style="font-style: inherit; font-size: 10pt; font-family: 'Courier New'; color: teal; background-color: white;"&gt;1&lt;/STRONG&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: 'Courier New'; background-color: white; color: black;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: 'Courier New'; background-color: white; color: teal;"&gt;mmddyy10.&lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: 'Courier New'; background-color: white; color: black;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: 'Courier New'; background-color: white; color: black;"&gt;);&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="ecxMsoNormal" style="font-style: inherit; font-family: inherit;"&gt; &lt;/P&gt;&lt;P class="ecxMsoNormal" style="font-style: inherit; font-family: inherit;"&gt;&lt;STRONG style="font-style: inherit; font-size: 10pt; font-family: 'Courier New'; color: navy; background-color: white;"&gt;run&lt;/STRONG&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: 'Courier New'; background-color: white; color: black;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="ecxMsoNormal"&gt;&lt;/P&gt;&lt;P class="ecxMsoNormal" style="font-style: inherit; font-family: inherit;"&gt;change the proc sql with:&lt;/P&gt;&lt;P class="ecxMsoNormal" style="font-style: inherit; font-family: inherit;"&gt;&lt;STRONG style="font-style: inherit; font-size: 10pt; font-family: 'Courier New'; background-color: white; color: navy;"&gt;proc&lt;/STRONG&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: 'Courier New'; background-color: white; color: black;"&gt; &lt;/SPAN&gt;&lt;STRONG style="font-style: inherit; font-size: 10pt; font-family: 'Courier New'; background-color: white; color: navy;"&gt;sql&lt;/STRONG&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: 'Courier New'; background-color: white; color: black;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="ecxMsoNormal" style="font-style: inherit; font-family: inherit;"&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: 'Courier New'; background-color: white; color: blue;"&gt;CREATE&lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: 'Courier New'; background-color: white; color: black;"&gt; &lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: 'Courier New'; background-color: white; color: blue;"&gt;TABLE&lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: 'Courier New'; background-color: white; color: black;"&gt; Part1 &lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: 'Courier New'; background-color: white; color: blue;"&gt;AS&lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: 'Courier New'; background-color: white; color: black;"&gt; &lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: 'Courier New'; background-color: white; color: blue;"&gt;select&lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: 'Courier New'; background-color: white; color: black;"&gt; * &lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: 'Courier New'; background-color: white; color: blue;"&gt;from&lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: 'Courier New'; background-color: white; color: black;"&gt; connection to ODBC&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="ecxMsoNormal" style="font-style: inherit; font-family: inherit;"&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: 'Courier New'; background-color: white; color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: 'Courier New'; background-color: white; color: blue;"&gt;SELECT&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="ecxMsoNormal"&gt;&lt;/P&gt;&lt;P class="ecxMsoNormal" style="font-style: inherit; font-family: inherit;"&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: 'Courier New'; background-color: white; color: black;"&gt;Date,&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="ecxMsoNormal" style="font-style: inherit; font-family: inherit;"&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: 'Courier New'; background-color: white; color: black;"&gt;CodeNumber,&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="ecxMsoNormal" style="font-style: inherit; font-family: inherit;"&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: 'Courier New'; background-color: white; color: black;"&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt;"&gt;Sum(A&lt;/SPAN&gt;mount) &lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: 'Courier New'; background-color: white; color: blue;"&gt;AS&lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: 'Courier New'; background-color: white; color: black;"&gt; ReplenAmount&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="ecxMsoNormal" style="font-style: inherit; font-family: inherit;"&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: 'Courier New'; background-color: white; color: blue;"&gt;FROM&lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: 'Courier New'; background-color: white; color: black;"&gt; tbVendors&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="ecxMsoNormal" style="font-style: inherit; font-family: inherit;"&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: 'Courier New'; background-color: white; color: blue;"&gt;where&lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: 'Courier New'; color: black; background-color: white;"&gt; DATE ="&amp;amp;yesterday"&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="ecxMsoNormal" style="font-style: inherit; font-family: inherit;"&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: 'Courier New'; background-color: white; color: blue;"&gt;GROUP&lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: 'Courier New'; background-color: white; color: black;"&gt; &lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: 'Courier New'; background-color: white; color: blue;"&gt;BY&lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: 'Courier New'; background-color: white; color: black;"&gt; &lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: 'Courier New'; background-color: white; color: black;"&gt;Date, cO&lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: 'Courier New'; background-color: white; color: black;"&gt;deNumber,&lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: 'Courier New'; background-color: white; color: black;"&gt;Amount&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="ecxMsoNormal" style="font-style: inherit; font-family: inherit;"&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: 'Courier New'; background-color: white; color: black;"&gt;O&lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: 'Courier New'; background-color: white; color: blue;"&gt;RDER&lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: 'Courier New'; background-color: white; color: black;"&gt; &lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: 'Courier New'; background-color: white; color: blue;"&gt;BY&lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: 'Courier New'; background-color: white; color: black;"&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt;"&gt; &lt;/SPAN&gt;CodeNumber);&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="ecxMsoNormal" style="font-style: inherit; font-family: inherit;"&gt;&amp;nbsp; &lt;STRONG style="font-style: inherit; font-size: 10pt; font-family: 'Courier New'; background-color: white; color: navy;"&gt;quit&lt;/STRONG&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: 'Courier New'; background-color: white; color: black;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="ecxMsoNormal" style="font-style: inherit; font-family: inherit;"&gt;The date is complicated used in the macro variable and using obdc connect is not SAS date variable, and macro variable has the format database odbc connect for success full insert.&lt;/P&gt;&lt;P class="ecxMsoNormal" style="font-style: inherit; font-family: inherit;"&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;SPAN style="font-style: inherit; font-family: inherit;"&gt;&lt;A _jive_internal="true" class=" jive-acclaim-likelink " data-command="like" data-object-id="144007" data-object-type="2" href="https://communities.sas.com/message/144007" id="jive-acclaim-likelink-2-144007-" style="font-style: inherit; font-family: inherit; color: #0e66ba;"&gt;Re: How to use date/time field&amp;nbsp; with a minus 1 day&lt;/A&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Nov 2012 01:22:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-use-date-time-field-with-a-minus-1-day/m-p/120489#M33224</guid>
      <dc:creator>Geraldo</dc:creator>
      <dc:date>2012-11-09T01:22:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to use date/time field  with a minus 1 day</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-use-date-time-field-with-a-minus-1-day/m-p/120490#M33225</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks i missed that&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Nov 2012 02:23:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-use-date-time-field-with-a-minus-1-day/m-p/120490#M33225</guid>
      <dc:creator>BETO</dc:creator>
      <dc:date>2012-11-09T02:23:06Z</dc:date>
    </item>
  </channel>
</rss>

