<?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 Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Yesterdays-Date/m-p/89793#M25641</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Fleroo&lt;/P&gt;&lt;DIV style="font-family: Consolas; font-size: 11pt;"&gt;&lt;BR /&gt;Check this code:&lt;/DIV&gt;&lt;DIV style="font-family: Consolas; font-size: 11pt;"&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;%let&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; curday=&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;%sysfunc&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;(PUTN(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;%eval&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;%sysfunc&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;(date()) - 1), date9.));&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;%put&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; NOTE: &amp;amp;=curday;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 25 Jul 2013 12:43:41 GMT</pubDate>
    <dc:creator>BrunoMueller</dc:creator>
    <dc:date>2013-07-25T12:43:41Z</dc:date>
    <item>
      <title>Yesterdays Date</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Yesterdays-Date/m-p/89790#M25638</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;Hello,&amp;nbsp; you folks helped me out immensely with figuring out how to turn the date of 1/1/1960 into a real date to be stored in an Oracle table.&amp;nbsp; I have another question on how to turn that date, which is the CURRENT date, into the PREVIOUS days date.&amp;nbsp; The following is the code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;nbsp; This gets the current Date.&lt;/P&gt;&lt;P&gt;%let curday=%sysfunc(date(), date9.);&lt;/P&gt;&lt;P&gt;%put &amp;amp;curday;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;* This loads the records into an Oracle table.&amp;nbsp; the date portion&amp;nbsp; hos_date is the date 7/25/2013 12:01:01 PM.&amp;nbsp; I want it to be Yesterday's Date of 7/24/2013 12:01:01 PM&lt;/P&gt;&lt;P&gt;proc sql; &lt;BR /&gt;insert into safety.safety_hrs_svc&lt;/P&gt;&lt;P&gt;select dhms("&amp;amp;curday"d,12,01,01) as hos_date, STATION, CONTR_ID, CONTR_NAME, PRIM_SVC_AREA_ID, DRIVER_NBR, DRIVER_NAME, PCK_DELV_HRS, SPOT_HRS, LINEHAUL_HRS from work.safety_hrs;&lt;BR /&gt;quit;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you very much.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Jul 2013 11:39:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Yesterdays-Date/m-p/89790#M25638</guid>
      <dc:creator>Fleroo</dc:creator>
      <dc:date>2013-07-25T11:39:16Z</dc:date>
    </item>
    <item>
      <title>Re: Yesterdays Date</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Yesterdays-Date/m-p/89791#M25639</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%let preday=%sysfunc(date()-1, date9.);&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Jul 2013 12:32:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Yesterdays-Date/m-p/89791#M25639</guid>
      <dc:creator>OS2Rules</dc:creator>
      <dc:date>2013-07-25T12:32:59Z</dc:date>
    </item>
    <item>
      <title>Re: Yesterdays Date</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Yesterdays-Date/m-p/89792#M25640</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;OS2, that generates the following error..... cut from the log.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;11&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; %let prevday=%sysfunc(date()-1, date9.);&lt;/P&gt;&lt;P&gt;ERROR: Expected close parenthesis after macro function invocation not found.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks so much for looking.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Jul 2013 12:42:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Yesterdays-Date/m-p/89792#M25640</guid>
      <dc:creator>Fleroo</dc:creator>
      <dc:date>2013-07-25T12:42:55Z</dc:date>
    </item>
    <item>
      <title>Re: Yesterdays Date</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Yesterdays-Date/m-p/89793#M25641</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Fleroo&lt;/P&gt;&lt;DIV style="font-family: Consolas; font-size: 11pt;"&gt;&lt;BR /&gt;Check this code:&lt;/DIV&gt;&lt;DIV style="font-family: Consolas; font-size: 11pt;"&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;%let&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; curday=&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;%sysfunc&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;(PUTN(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;%eval&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;%sysfunc&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;(date()) - 1), date9.));&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;%put&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; NOTE: &amp;amp;=curday;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Jul 2013 12:43:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Yesterdays-Date/m-p/89793#M25641</guid>
      <dc:creator>BrunoMueller</dc:creator>
      <dc:date>2013-07-25T12:43:41Z</dc:date>
    </item>
    <item>
      <title>Re: Yesterdays Date</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Yesterdays-Date/m-p/89794#M25642</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;My Bad:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;use:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL SYMPUT('predte',put(date()-1.date9.));&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Jul 2013 12:47:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Yesterdays-Date/m-p/89794#M25642</guid>
      <dc:creator>OS2Rules</dc:creator>
      <dc:date>2013-07-25T12:47:03Z</dc:date>
    </item>
    <item>
      <title>Re: Yesterdays Date</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Yesterdays-Date/m-p/89795#M25643</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Bruno......... BANG.&amp;nbsp; YOU NAILED&amp;nbsp; IT.&amp;nbsp; Man you're good.&amp;nbsp;&amp;nbsp; Do you want to fly to Pennsylvania ?&amp;nbsp;&amp;nbsp; :smileylaugh:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;THANKS ALL.... I LUV THIS BOARD&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Jul 2013 12:54:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Yesterdays-Date/m-p/89795#M25643</guid>
      <dc:creator>Fleroo</dc:creator>
      <dc:date>2013-07-25T12:54:55Z</dc:date>
    </item>
    <item>
      <title>Re: Yesterdays Date</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Yesterdays-Date/m-p/89796#M25644</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can also use INTNX:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%let curday=%sysfunc(intnx(day,%sysfunc(date()), -1),date9.);&lt;/P&gt;&lt;P&gt;%put NOTE: &amp;amp;=curday;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Haikuo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Jul 2013 13:08:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Yesterdays-Date/m-p/89796#M25644</guid>
      <dc:creator>Haikuo</dc:creator>
      <dc:date>2013-07-25T13:08:47Z</dc:date>
    </item>
  </channel>
</rss>

