<?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: Number of Days Calculation in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Number-of-Days-Calculation/m-p/415829#M26742</link>
    <description>&lt;P&gt;After you define a prompt, you have to attach it to the project node in question via the Properties context menu.&lt;/P&gt;</description>
    <pubDate>Thu, 23 Nov 2017 13:55:21 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2017-11-23T13:55:21Z</dc:date>
    <item>
      <title>Number of Days Calculation</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Number-of-Days-Calculation/m-p/415817#M26736</link>
      <description>&lt;P&gt;Hi guys,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a computed column I'm using with a query builder in SAS EG 7.1 that takes the amount of days between my field called t2.MODIFIEDDATE and today.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It currently reads as follows and works fine:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;DATDIF( t2.MODIFIEDDATE,DATE(),'ALT/ALT')&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, I would like to be able to have today's date replaced with a date that is a variable that can be typed in via prompt so I can "backdate" it to act as if it were to be run yesterday, for example.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Do you know how I can go about this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Chris&lt;/P&gt;</description>
      <pubDate>Thu, 23 Nov 2017 13:20:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Number-of-Days-Calculation/m-p/415817#M26736</guid>
      <dc:creator>CWilson4815</dc:creator>
      <dc:date>2017-11-23T13:20:44Z</dc:date>
    </item>
    <item>
      <title>Re: Number of Days Calculation</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Number-of-Days-Calculation/m-p/415821#M26738</link>
      <description>&lt;P&gt;In Enterprise Guide, add a User Prompt (icon right next to the server list, blue circle with digits 1,2,3). Define it as a date prompt. In the code, you have access to the result via a macro variable that has the same name as the prompt.&lt;/P&gt;
&lt;P&gt;eg if you named your prompt "mydate", your code will then look like&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;DATDIF( t2.MODIFIEDDATE,&amp;amp;mydate.,'ALT/ALT')&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 23 Nov 2017 13:27:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Number-of-Days-Calculation/m-p/415821#M26738</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2017-11-23T13:27:32Z</dc:date>
    </item>
    <item>
      <title>Re: Number of Days Calculation</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Number-of-Days-Calculation/m-p/415823#M26739</link>
      <description>&lt;P&gt;Thanks Kurt, however it is returning the following SYNTAX error:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;(DATDIF( t2.MODIFIEDDATE,&amp;amp;mydate.,'ALT/ALT')) LABEL="DAYSSINCELASTDECISION" AS DAYSSINCELASTDECISION,&lt;BR /&gt;&lt;BR /&gt;ERROR 22-322: Syntax error, expecting one of the following: a name, a quoted string, a numeric constant, a datetime constant, 
              a missing value, ), BTRIM, INPUT, PUT, SUBSTRING, USER.  

ERROR 22-322: Syntax error, expecting one of the following: a name, *.&lt;/PRE&gt;</description>
      <pubDate>Thu, 23 Nov 2017 13:38:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Number-of-Days-Calculation/m-p/415823#M26739</guid>
      <dc:creator>CWilson4815</dc:creator>
      <dc:date>2017-11-23T13:38:38Z</dc:date>
    </item>
    <item>
      <title>Re: Number of Days Calculation</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Number-of-Days-Calculation/m-p/415825#M26740</link>
      <description>&lt;P&gt;Oh, missed that the date will come in standard SAS notation. Add double quotes and a d:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;(DATDIF( t2.MODIFIEDDATE,"&amp;amp;mydate."d,'ALT/ALT'))&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 23 Nov 2017 13:43:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Number-of-Days-Calculation/m-p/415825#M26740</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2017-11-23T13:43:16Z</dc:date>
    </item>
    <item>
      <title>Re: Number of Days Calculation</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Number-of-Days-Calculation/m-p/415827#M26741</link>
      <description>&lt;P&gt;Looks like we're nearly there but I've got an error as follows:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;((DATDIF( t2.MODIFIEDDATE,"&amp;amp;mydate."d,'ALT/ALT'))) LABEL="DAYSSINCELASTDECISION" AS DAYSSINCELASTDECISION,
WARNING: Apparent symbolic reference MYDATE not resolved.
ERROR: Invalid date/time/datetime constant "&amp;amp;mydate."d.&lt;/PRE&gt;</description>
      <pubDate>Thu, 23 Nov 2017 13:51:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Number-of-Days-Calculation/m-p/415827#M26741</guid>
      <dc:creator>CWilson4815</dc:creator>
      <dc:date>2017-11-23T13:51:05Z</dc:date>
    </item>
    <item>
      <title>Re: Number of Days Calculation</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Number-of-Days-Calculation/m-p/415829#M26742</link>
      <description>&lt;P&gt;After you define a prompt, you have to attach it to the project node in question via the Properties context menu.&lt;/P&gt;</description>
      <pubDate>Thu, 23 Nov 2017 13:55:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Number-of-Days-Calculation/m-p/415829#M26742</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2017-11-23T13:55:21Z</dc:date>
    </item>
    <item>
      <title>Re: Number of Days Calculation</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Number-of-Days-Calculation/m-p/415870#M26746</link>
      <description>&lt;P&gt;School boy stuff, thanks a lot Kurt.&lt;/P&gt;</description>
      <pubDate>Thu, 23 Nov 2017 16:58:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Number-of-Days-Calculation/m-p/415870#M26746</guid>
      <dc:creator>CWilson4815</dc:creator>
      <dc:date>2017-11-23T16:58:20Z</dc:date>
    </item>
  </channel>
</rss>

