<?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 Today or date function in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/Today-or-date-function/m-p/681837#M24065</link>
    <description>&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm trying to create the variable that will contain month and day of today date.&lt;/P&gt;&lt;P&gt;I tried to create it with today() function and then take month and day from today function like this:&lt;/P&gt;&lt;P&gt;month (today()) and day(today()). The problem is that when I create a new column with today() function there is written some number and not just a date, therefore month() and day() functions do not work. Could you please help me to solve this problem?&lt;/P&gt;&lt;P&gt;Thank you in advance&lt;/P&gt;</description>
    <pubDate>Sat, 05 Sep 2020 23:30:46 GMT</pubDate>
    <dc:creator>Nini1</dc:creator>
    <dc:date>2020-09-05T23:30:46Z</dc:date>
    <item>
      <title>Today or date function</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Today-or-date-function/m-p/681837#M24065</link>
      <description>&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm trying to create the variable that will contain month and day of today date.&lt;/P&gt;&lt;P&gt;I tried to create it with today() function and then take month and day from today function like this:&lt;/P&gt;&lt;P&gt;month (today()) and day(today()). The problem is that when I create a new column with today() function there is written some number and not just a date, therefore month() and day() functions do not work. Could you please help me to solve this problem?&lt;/P&gt;&lt;P&gt;Thank you in advance&lt;/P&gt;</description>
      <pubDate>Sat, 05 Sep 2020 23:30:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Today-or-date-function/m-p/681837#M24065</guid>
      <dc:creator>Nini1</dc:creator>
      <dc:date>2020-09-05T23:30:46Z</dc:date>
    </item>
    <item>
      <title>Re: Today or date function</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Today-or-date-function/m-p/681838#M24066</link>
      <description>&lt;P&gt;You need to show more what you did.&amp;nbsp; A date IS just a number. The number of days since start of 1960. The MONTH() and DAY() functions do not care what format you are using to display the number, just that the number has the right value for a date.&lt;/P&gt;
&lt;PRE&gt;2010  data test;
2011     today=date();
2012     month=month(today);
2013     day=day(today);
2014     put today=comma7. +1 today date9. +1 today yymmdd10. ;
2015     put month= day=;
2016  run;

today=22,163  05SEP2020 2020-09-05
month=9 day=5
NOTE: The data set WORK.TEST has 1 observations and 3 variables.
&lt;/PRE&gt;</description>
      <pubDate>Sat, 05 Sep 2020 23:44:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Today-or-date-function/m-p/681838#M24066</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2020-09-05T23:44:02Z</dc:date>
    </item>
    <item>
      <title>Re: Today or date function</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Today-or-date-function/m-p/681861#M24067</link>
      <description>&lt;P&gt;This works:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
    thisday=today();
    thismonth=month(thisday);
    thisyear=year(thisday);
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Since I did this in September 2020, I get the results thismonth=9 and thisyear=2020, which are correct.&lt;/P&gt;</description>
      <pubDate>Sun, 06 Sep 2020 11:00:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Today-or-date-function/m-p/681861#M24067</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2020-09-06T11:00:05Z</dc:date>
    </item>
    <item>
      <title>Re: Today or date function</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Today-or-date-function/m-p/682066#M24079</link>
      <description>Thank you very much</description>
      <pubDate>Mon, 07 Sep 2020 20:52:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Today-or-date-function/m-p/682066#M24079</guid>
      <dc:creator>Nini1</dc:creator>
      <dc:date>2020-09-07T20:52:53Z</dc:date>
    </item>
  </channel>
</rss>

