<?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: Today() function in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Today-function/m-p/240701#M17259</link>
    <description>The function is working properly, please read up on how SAS stores dates, as number of days from January 1, 1960.  So it's been 20445 days since Jan 1, 1960. To view as a date, apply the desired format. &lt;BR /&gt;&lt;BR /&gt;Change to your code:&lt;BR /&gt;TODAY() AS Today format=date9.&lt;BR /&gt;&lt;BR /&gt;Example demonstration:&lt;BR /&gt;data _null_;&lt;BR /&gt;&lt;BR /&gt;x=today();&lt;BR /&gt;&lt;BR /&gt;y=x; &lt;BR /&gt;format y date9.;&lt;BR /&gt;&lt;BR /&gt;put "Unformatted:" x "Formatted:" y;&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
    <pubDate>Wed, 23 Dec 2015 20:46:31 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2015-12-23T20:46:31Z</dc:date>
    <item>
      <title>Today() function</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Today-function/m-p/240688#M17254</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I created a new column with only Today() function.&amp;nbsp; However, it returns the date as of 01Jan1960, not today's date.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any idea?&lt;/P&gt;</description>
      <pubDate>Wed, 23 Dec 2015 19:32:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Today-function/m-p/240688#M17254</guid>
      <dc:creator>sdang</dc:creator>
      <dc:date>2015-12-23T19:32:55Z</dc:date>
    </item>
    <item>
      <title>Re: Today() function</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Today-function/m-p/240692#M17255</link>
      <description>&lt;P&gt;Please supply your complete program. One possibility is that the variable you are assigning TODAY() to is fomatted as a DATETIME not as a DATE. Without your code we would just be guessing.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 23 Dec 2015 19:55:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Today-function/m-p/240692#M17255</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2015-12-23T19:55:03Z</dc:date>
    </item>
    <item>
      <title>Re: Today() function</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Today-function/m-p/240695#M17256</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hi, below are the codes.&amp;nbsp; This time I did not formatt it.&amp;nbsp; The number SAS gives me for every available row is 20445. I also attached a image of the result it gave me.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;STRONG&gt;PROC&lt;/STRONG&gt;&lt;/FONT&gt; &lt;STRONG&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;SQL&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;CREATE&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;TABLE&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;FONT face="Courier New" size="3"&gt; WORK.QUERY_FOR_THE_SEASON_PARTIC_0002 &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;AS&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;SELECT&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;FONT face="Courier New" size="3"&gt; t1.GuestNumber1, &lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#008000" face="Courier New" size="3"&gt;&lt;FONT color="#008000" face="Courier New" size="3"&gt;&lt;FONT color="#008000" face="Courier New" size="3"&gt;/* COUNT_of_GuestNumber1 */&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;FONT face="Courier New" size="3"&gt; (COUNT(t1.GuestNumber1)) &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;AS&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;FONT face="Courier New" size="3"&gt; COUNT_of_GuestNumber1, &lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#008000" face="Courier New" size="3"&gt;&lt;FONT color="#008000" face="Courier New" size="3"&gt;&lt;FONT color="#008000" face="Courier New" size="3"&gt;/* Calculation */&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;FONT face="Courier New" size="3"&gt; (TODAY()) &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;AS&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;FONT face="Courier New" size="3"&gt; Today()&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;FROM&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;FONT face="Courier New" size="3"&gt; WORK.QUERY_FOR_THE_SEASON_PARTIC_0000 t1&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;GROUP&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;BY&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;FONT face="Courier New" size="3"&gt; t1.GuestNumber1,&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;(CALCULATED Calculation);&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;STRONG&gt;QUIT&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;IMG title="Capture.PNG" alt="Capture.PNG" src="https://communities.sas.com/t5/image/serverpage/image-id/1309iFD7432FE7860FE81/image-size/original?v=mpbl-1&amp;amp;px=-1" border="0" /&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 23 Dec 2015 19:59:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Today-function/m-p/240695#M17256</guid>
      <dc:creator>sdang</dc:creator>
      <dc:date>2015-12-23T19:59:25Z</dc:date>
    </item>
    <item>
      <title>Re: Today() function</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Today-function/m-p/240696#M17257</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;PROC SQL;
 
CREATE TABLE WORK.QUERY_FOR_THE_SEASON_PARTIC_0002 AS
 
SELECT t1.GuestNumber1, 

/* COUNT_of_GuestNumber1 */
 
(COUNT(t1.GuestNumber1)) AS COUNT_of_GuestNumber1, 

/* Calculation */
 
TODAY() AS Today format = date9.&lt;BR /&gt; 
FROM WORK.QUERY_FOR_THE_SEASON_PARTIC_0000 t1
 
GROUP BY t1.GuestNumber1,
 
(CALCULATED Calculation);
 
QUIT;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 23 Dec 2015 20:09:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Today-function/m-p/240696#M17257</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2015-12-23T20:09:14Z</dc:date>
    </item>
    <item>
      <title>Re: Today() function</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Today-function/m-p/240698#M17258</link>
      <description>&lt;P&gt;Hi, I wrote your codes now but it still gives me the same result--see image below.&lt;/P&gt;
&lt;P&gt;Below are the codes:&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;STRONG&gt;PROC&lt;/STRONG&gt;&lt;/FONT&gt; &lt;STRONG&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;SQL&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;CREATE&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;TABLE&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;FONT face="Courier New" size="3"&gt; WORK.QUERY_FOR_FILTER_FOR_QUERY__0003 &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;AS&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;SELECT&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;FONT face="Courier New" size="3"&gt; t1.GuestNumber, &lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#008000" face="Courier New" size="3"&gt;&lt;FONT color="#008000" face="Courier New" size="3"&gt;&lt;FONT color="#008000" face="Courier New" size="3"&gt;/* COUNT_of_GuestNumber */&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;FONT face="Courier New" size="3"&gt; (COUNT(t1.GuestNumber)) &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;AS&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;FONT face="Courier New" size="3"&gt; COUNT_of_GuestNumber, &lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#008000" face="Courier New" size="3"&gt;&lt;FONT color="#008000" face="Courier New" size="3"&gt;&lt;FONT color="#008000" face="Courier New" size="3"&gt;/* Today */&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;FONT face="Courier New" size="3"&gt; TODAY() &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;AS&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;FONT face="Courier New" size="3"&gt; Today&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;FROM&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;FONT face="Courier New" size="3"&gt; WORK.QUERY_FOR_FILTER_FOR_QUERY_FOR_T t1&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;GROUP&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;BY&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;FONT face="Courier New" size="3"&gt; t1.GuestNumber,&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;(CALCULATED Today);&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;STRONG&gt;QUIT&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;FONT face="Courier New" size="3"&gt;Thank you&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;IMG title="Capture.PNG" alt="Capture.PNG" src="https://communities.sas.com/t5/image/serverpage/image-id/1310iB16D2AA481793074/image-size/original?v=mpbl-1&amp;amp;px=-1" border="0" /&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 23 Dec 2015 20:13:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Today-function/m-p/240698#M17258</guid>
      <dc:creator>sdang</dc:creator>
      <dc:date>2015-12-23T20:13:51Z</dc:date>
    </item>
    <item>
      <title>Re: Today() function</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Today-function/m-p/240701#M17259</link>
      <description>The function is working properly, please read up on how SAS stores dates, as number of days from January 1, 1960.  So it's been 20445 days since Jan 1, 1960. To view as a date, apply the desired format. &lt;BR /&gt;&lt;BR /&gt;Change to your code:&lt;BR /&gt;TODAY() AS Today format=date9.&lt;BR /&gt;&lt;BR /&gt;Example demonstration:&lt;BR /&gt;data _null_;&lt;BR /&gt;&lt;BR /&gt;x=today();&lt;BR /&gt;&lt;BR /&gt;y=x; &lt;BR /&gt;format y date9.;&lt;BR /&gt;&lt;BR /&gt;put "Unformatted:" x "Formatted:" y;&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 23 Dec 2015 20:46:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Today-function/m-p/240701#M17259</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2015-12-23T20:46:31Z</dc:date>
    </item>
    <item>
      <title>Re: Today() function</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Today-function/m-p/240705#M17260</link>
      <description>&lt;P&gt;As Reeza has stated you left off FORMAT = date9.&lt;/P&gt;</description>
      <pubDate>Wed, 23 Dec 2015 21:10:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Today-function/m-p/240705#M17260</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2015-12-23T21:10:08Z</dc:date>
    </item>
  </channel>
</rss>

