<?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: SAS date in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/SAS-date/m-p/778799#M247945</link>
    <description>&lt;P&gt;What I suspected. You don't have dates, you have strings that look like dates. Do this:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;month = month(input(Date,monyy7.));
year = year(input(Date,monyy7.));&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Or, even better, read the data as dates when it arrives in SAS; how you do this depends on the type of data source.&lt;/P&gt;</description>
    <pubDate>Fri, 05 Nov 2021 15:16:08 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2021-11-05T15:16:08Z</dc:date>
    <item>
      <title>SAS date</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-date/m-p/778656#M247880</link>
      <description>&lt;P&gt;I have my Date variable which is a column containing dates from March 2006 to September 2020. The dates are presented as follows: MAR2006, AVR2006 ... until SEP2020 in SAS. I would like to create a month variable and a variable year. When I do month = month (Date) and year = year (Date) I just have empty columns.&lt;/P&gt;</description>
      <pubDate>Fri, 05 Nov 2021 03:50:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-date/m-p/778656#M247880</guid>
      <dc:creator>fox96</dc:creator>
      <dc:date>2021-11-05T03:50:05Z</dc:date>
    </item>
    <item>
      <title>sas date</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-date/m-p/778657#M247883</link>
      <description>&lt;P&gt;&lt;SPAN&gt;I have my Date variable which is a column containing dates from March 2006 to September 2020. The dates are presented as follows: MAR2006, AVR2006 ... until SEP2020 in SAS. I would like to create a month variable and a variable year. When I do month = month (Date) and year = year (Date) I just have empty columns.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 05 Nov 2021 03:51:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-date/m-p/778657#M247883</guid>
      <dc:creator>fox96</dc:creator>
      <dc:date>2021-11-05T03:51:10Z</dc:date>
    </item>
    <item>
      <title>Re: SAS date</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-date/m-p/778658#M247881</link>
      <description>&lt;P&gt;What's the type of your DATE variable? What does the log show?&lt;/P&gt;</description>
      <pubDate>Fri, 05 Nov 2021 04:31:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-date/m-p/778658#M247881</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2021-11-05T04:31:51Z</dc:date>
    </item>
    <item>
      <title>Re: SAS date</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-date/m-p/778660#M247884</link>
      <description>my variable is alphanumeric.I'm a new sas user,where can i see the log?</description>
      <pubDate>Fri, 05 Nov 2021 05:14:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-date/m-p/778660#M247884</guid>
      <dc:creator>fox96</dc:creator>
      <dc:date>2021-11-05T05:14:53Z</dc:date>
    </item>
    <item>
      <title>Re: SAS date</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-date/m-p/778661#M247885</link>
      <description>&lt;P&gt;In SAS, dates are counts of days, with 1960-01-01 as day zero.&lt;/P&gt;
&lt;P&gt;Therefore, variables that contain dates (or date-related values like months, as in your case, or quarters) have to be numeric and have a date format assigned. I suspect that your variables are character, which will be documented in your log, so please post that.&lt;/P&gt;
&lt;P&gt;Copy/paste the log text into a window opened with this button:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Bildschirmfoto 2020-04-07 um 08.32.59.jpg" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/54552i914D97BE1B0F21E5/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Bildschirmfoto 2020-04-07 um 08.32.59.jpg" alt="Bildschirmfoto 2020-04-07 um 08.32.59.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 05 Nov 2021 05:14:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-date/m-p/778661#M247885</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2021-11-05T05:14:56Z</dc:date>
    </item>
    <item>
      <title>Re: SAS date</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-date/m-p/778662#M247886</link>
      <description>&lt;P&gt;Depending on your interface, your code will have a Log window or Log tab.&lt;/P&gt;
&lt;P&gt;Possible interfaces:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;SAS Studio (web-based, used with SAS On Demand)&lt;/LI&gt;
&lt;LI&gt;Enterprise Guide ("fat" client, Windows only)&lt;/LI&gt;
&lt;LI&gt;Display Manager ("native" SAS interface, rarely used today)&lt;/LI&gt;
&lt;/UL&gt;</description>
      <pubDate>Fri, 05 Nov 2021 05:23:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-date/m-p/778662#M247886</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2021-11-05T05:23:10Z</dc:date>
    </item>
    <item>
      <title>Re: SAS date</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-date/m-p/778665#M247888</link>
      <description>&lt;P&gt;You need to familiarise yourself with the log. &lt;STRONG&gt;Always&lt;/STRONG&gt; check it, even when there seems to be no errors. Always.&lt;/P&gt;
&lt;P&gt;You can change your string to a number by using the correct &lt;EM&gt;informat&lt;/EM&gt;, &lt;A href="https://documentation.sas.com/doc/en/vdmmlcdc/8.1/leforinforref/p0720b1ks40htdn1s09vs9a0kr6m.htm" target="_self"&gt;monyy&lt;/A&gt;. in your case:&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;NUM=input(CHAR,monyy.);&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;To display your variable as a date use a date &lt;EM&gt;format&lt;/EM&gt;, for example:&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;format NUM date9;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 05 Nov 2021 06:53:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-date/m-p/778665#M247888</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2021-11-05T06:53:05Z</dc:date>
    </item>
    <item>
      <title>Re: SAS date</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-date/m-p/778701#M247903</link>
      <description>&lt;P&gt;Like the others said we are going to need to see your SAS log and probably an example of your data/code.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You probably need to review&amp;nbsp;&lt;A href="https://go.documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/basess/p0er6damfbjifwn1ih1b1tacw5zj.htm" target="_self"&gt;Working with Dates in the SAS System&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here's an example that might help you understand, note that SAS stores date values as the number of days since 01JAN1960 (day 0). In the code below you will see myDate contains the number 22589 (05Nov2021) , the number of days since 01Jan1960.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want ;
	/* Get todays date and store in variable myDate */
	myDate=today() ;
	/* Get the year part of myDate */
	year=year(myDate) ;
	/* Get the month part of myDate */
	month=month(myDate) ;
	/* send myDate (raw value), myDate formatted, year and month to log */ 
	put myDate= myDate= date7. year= month= ;
run ;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Here's what the log looks like when you run the above code, I highlighted the output from the put statement:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;2451  data want ;
2452      myDate=today() ;
2453      year=year(myDate) ;
2454      month=month(myDate) ;
2455      put myDate= myDate= date7. year= month= ;
2456  run ;

&lt;FONT color="#FF0000"&gt;myDate=22589 myDate=05NOV21 year=2021 month=11&lt;/FONT&gt;
NOTE: The data set WORK.WANT has 1 observations and 3 variables.
NOTE: DATA statement used (Total process time):
      real time           0.02 seconds
      cpu time            0.00 seconds
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 05 Nov 2021 11:45:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-date/m-p/778701#M247903</guid>
      <dc:creator>AMSAS</dc:creator>
      <dc:date>2021-11-05T11:45:05Z</dc:date>
    </item>
    <item>
      <title>Re: SAS date</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-date/m-p/778775#M247936</link>
      <description>&lt;P&gt;my code:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=""&gt;DATA ESTIMATIONS_ALL;
SET ESTIMATIONS_ALL;
month=month(Date);
year=year(Date);
RUN;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;my log:&lt;/P&gt;&lt;PRE&gt;   ;*';*";*/;quit;run;
2          OPTIONS PAGENO=MIN;
3          %LET _CLIENTTASKLABEL='MATH30602.A2021_Devoir1_VotreMatricule.sas';
4          %LET _CLIENTPROCESSFLOWNAME='Standalone Not In Project';
5          %LET _CLIENTPROJECTPATH='';
6          %LET _CLIENTPROJECTPATHHOST='';
7          %LET _CLIENTPROJECTNAME='';
8          %LET _SASPROGRAMFILE='C:\Users\axel_\OneDrive\Bureau\Logiciels statistiques\MATH30602.A2021_Devoir1_VotreMatricule.sas';
9          %LET _SASPROGRAMFILEHOST='LAPTOP-NMODV674';
10         
11         ODS _ALL_ CLOSE;
12         OPTIONS DEV=SVG;
13         GOPTIONS XPIXELS=0 YPIXELS=0;
14         %macro HTML5AccessibleGraphSupported;
15             %if %_SAS_VERCOMP_FV(9,4,4, 0,0,0) &amp;gt;= 0 %then ACCESSIBLE_GRAPH;
16         %mend;
17         FILENAME EGHTML TEMP;
18         ODS HTML5(ID=EGHTML) FILE=EGHTML
19             OPTIONS(BITMAP_MODE='INLINE')
20             %HTML5AccessibleGraphSupported
21             ENCODING='utf-8'
22             STYLE=HtmlBlue
23             NOGTITLE
24             NOGFOOTNOTE
25             GPATH=&amp;amp;sasworklocation
26         ;
NOTE: Writing HTML5(EGHTML) Body file: EGHTML
27         
28         DATA ESTIMATIONS_ALL;
29         SET ESTIMATIONS_ALL;
30         month=month(Date);
31         year=year(Date);
32         RUN;

NOTE: Character values have been converted to numeric values at the places given by: (Line):(Column).
      30:13   31:11   
NOTE: Invalid numeric data, Date='Mar2006' , at ligne 30 colonne 13.
NOTE: Invalid numeric data, Date='Mar2006' , at ligne 31 colonne 11.
Date=Mar2006 Geo_id=1 caracteristique_id=1 education_id=1 groupe_age_id=1 Both sexes=10147.7 Male=4975.8 Female=5171.9 month=.
year=. _ERROR_=1 _N_=1
NOTE: Invalid numeric data, Date='Mar2006' , at ligne 30 colonne 13.
NOTE: Invalid numeric data, Date='Mar2006' , at ligne 31 colonne 11.
Date=Mar2006 Geo_id=1 caracteristique_id=1 education_id=1 groupe_age_id=2 Both sexes=8609 Male=4296.6 Female=4312.4 month=. year=.
_ERROR_=1 _N_=2
NOTE: Invalid numeric data, Date='Mar2006' , at ligne 30 colonne 13.
NOTE: Invalid numeric data, Date='Mar2006' , at ligne 31 colonne 11.
Date=Mar2006 Geo_id=1 caracteristique_id=1 education_id=1 groupe_age_id=3 Both sexes=857.7 Male=439.5 Female=418.1 month=. year=.
_ERROR_=1 _N_=3
NOTE: Invalid numeric data, Date='Mar2006' , at ligne 30 colonne 13.
NOTE: Invalid numeric data, Date='Mar2006' , at ligne 31 colonne 11.
Date=Mar2006 Geo_id=1 caracteristique_id=1 education_id=1 groupe_age_id=4 Both sexes=1715.8 Male=875.7 Female=840.1 month=. year=.
_ERROR_=1 _N_=4
NOTE: Invalid numeric data, Date='Mar2006' , at ligne 30 colonne 13.
NOTE: Invalid numeric data, Date='Mar2006' , at ligne 31 colonne 11.
Date=Mar2006 Geo_id=1 caracteristique_id=1 education_id=1 groupe_age_id=5 Both sexes=858.1 Male=436.2 Female=421.9 month=. year=.
_ERROR_=1 _N_=5
NOTE: Invalid numeric data, Date='Mar2006' , at ligne 30 colonne 13.
NOTE: Invalid numeric data, Date='Mar2006' , at ligne 31 colonne 11.
2                                                          Le Système SAS                             09:05 Friday, November 5, 2021

Date=Mar2006 Geo_id=1 caracteristique_id=1 education_id=1 groupe_age_id=6 Both sexes=3682.3 Male=1835.8 Female=1846.5 month=. year=.
_ERROR_=1 _N_=6
NOTE: Invalid numeric data, Date='Mar2006' , at ligne 30 colonne 13.
NOTE: Invalid numeric data, Date='Mar2006' , at ligne 31 colonne 11.
Date=Mar2006 Geo_id=1 caracteristique_id=1 education_id=1 groupe_age_id=7 Both sexes=5551.5 Male=2763.4 Female=2788.1 month=. year=.
_ERROR_=1 _N_=7
NOTE: Invalid numeric data, Date='Mar2006' , at ligne 30 colonne 13.
NOTE: Invalid numeric data, Date='Mar2006' , at ligne 31 colonne 11.
Date=Mar2006 Geo_id=1 caracteristique_id=1 education_id=1 groupe_age_id=8 Both sexes=8431.9 Male=4100.1 Female=4331.8 month=. year=.
_ERROR_=1 _N_=8
NOTE: Invalid numeric data, Date='Mar2006' , at ligne 30 colonne 13.
NOTE: Invalid numeric data, Date='Mar2006' , at ligne 31 colonne 11.
Date=Mar2006 Geo_id=1 caracteristique_id=1 education_id=1 groupe_age_id=9 Both sexes=1869.2 Male=927.6 Female=941.6 month=. year=.
_ERROR_=1 _N_=9
NOTE: Invalid numeric data, Date='Mar2006' , at ligne 30 colonne 13.
NOTE: Invalid numeric data, Date='Mar2006' , at ligne 31 colonne 11.
Date=Mar2006 Geo_id=1 caracteristique_id=1 education_id=1 groupe_age_id=10 Both sexes=1341.7 Male=657.5 Female=684.2 month=. year=.
_ERROR_=1 _N_=10
NOTE: Invalid numeric data, Date='Mar2006' , at ligne 30 colonne 13.
NOTE: Invalid numeric data, Date='Mar2006' , at ligne 31 colonne 11.
Date=Mar2006 Geo_id=1 caracteristique_id=1 education_id=1 groupe_age_id=11 Both sexes=2880.4 Male=1336.7 Female=1543.7 month=.
year=. _ERROR_=1 _N_=11
NOTE: Invalid numeric data, Date='Mar2006' , at ligne 30 colonne 13.
NOTE: Invalid numeric data, Date='Mar2006' , at ligne 31 colonne 11.
Date=Mar2006 Geo_id=1 caracteristique_id=1 education_id=1 groupe_age_id=12 Both sexes=1538.7 Male=679.2 Female=859.5 month=. year=.
_ERROR_=1 _N_=12
NOTE: Invalid numeric data, Date='Mar2006' , at ligne 30 colonne 13.
NOTE: Invalid numeric data, Date='Mar2006' , at ligne 31 colonne 11.
Date=Mar2006 Geo_id=1 caracteristique_id=1 education_id=2 groupe_age_id=1 Both sexes=731 Male=323.4 Female=407.6 month=. year=.
_ERROR_=1 _N_=13
NOTE: Invalid numeric data, Date='Mar2006' , at ligne 30 colonne 13.
NOTE: Invalid numeric data, Date='Mar2006' , at ligne 31 colonne 11.
Date=Mar2006 Geo_id=1 caracteristique_id=1 education_id=2 groupe_age_id=2 Both sexes=320.4 Male=150.6 Female=169.9 month=. year=.
_ERROR_=1 _N_=14
NOTE: Invalid numeric data, Date='Mar2006' , at ligne 30 colonne 13.
NOTE: Invalid numeric data, Date='Mar2006' , at ligne 31 colonne 11.
Date=Mar2006 Geo_id=1 caracteristique_id=1 education_id=2 groupe_age_id=3 Both sexes=40.7 Male=19.9 Female=20.8 month=. year=.
_ERROR_=1 _N_=15
NOTE: Invalid numeric data, Date='Mar2006' , at ligne 30 colonne 13.
NOTE: Invalid numeric data, Date='Mar2006' , at ligne 31 colonne 11.
Date=Mar2006 Geo_id=1 caracteristique_id=1 education_id=2 groupe_age_id=4 Both sexes=53.3 Male=25.5 Female=27.8 month=. year=.
_ERROR_=1 _N_=16
NOTE: Invalid numeric data, Date='Mar2006' , at ligne 30 colonne 13.
NOTE: Invalid numeric data, Date='Mar2006' , at ligne 31 colonne 11.
Date=Mar2006 Geo_id=1 caracteristique_id=1 education_id=2 groupe_age_id=5 Both sexes=12.6 Male=5.6 Female=7 month=. year=. _ERROR_=1
_N_=17
NOTE: Invalid numeric data, Date='Mar2006' , at ligne 30 colonne 13.
NOTE: Invalid numeric data, Date='Mar2006' , at ligne 31 colonne 11.
Date=Mar2006 Geo_id=1 caracteristique_id=1 education_id=2 groupe_age_id=6 Both sexes=64.9 Male=35.3 Female=29.6 month=. year=.
_ERROR_=1 _N_=18
NOTE: Invalid numeric data, Date='Mar2006' , at ligne 30 colonne 13.
NOTE: Invalid numeric data, Date='Mar2006' , at ligne 31 colonne 11.
Date=Mar2006 Geo_id=1 caracteristique_id=1 education_id=2 groupe_age_id=7 Both sexes=141.6 Male=69.1 Female=72.5 month=. year=.
_ERROR_=1 _N_=19
NOTE: Invalid numeric data, Date='Mar2006' , at ligne 30 colonne 13.
NOTE: Invalid numeric data, Date='Mar2006' , at ligne 31 colonne 11.
WARNING: Limit set by ERRORS= option reached.  Further errors of this type will not be printed.
Date=Mar2006 Geo_id=1 caracteristique_id=1 education_id=2 groupe_age_id=8 Both sexes=677.7 Male=297.9 Female=379.8 month=. year=.
3                                                          Le Système SAS                             09:05 Friday, November 5, 2021

_ERROR_=1 _N_=20
NOTE: Missing values were generated as a result of performing an operation on missing values.
      Each place is given by: (Number of times) at (Line):(Column).
      247800 à 30:7   247800 à 31:6   
NOTE: There were 247800 observations read from the data set WORK.ESTIMATIONS_ALL.
NOTE: The data set WORK.ESTIMATIONS_ALL has 247800 observations and 10 variables.
NOTE: DATA statement a utilisé (Durée totale du traitement) :
      real time           0.16 seconds
      cpu time            0.15 seconds
      

33         
34         %LET _CLIENTTASKLABEL=;
35         %LET _CLIENTPROCESSFLOWNAME=;
36         %LET _CLIENTPROJECTPATH=;
37         %LET _CLIENTPROJECTPATHHOST=;
38         %LET _CLIENTPROJECTNAME=;
39         %LET _SASPROGRAMFILE=;
40         %LET _SASPROGRAMFILEHOST=;
41         
42         ;*';*";*/;quit;run;
43         ODS _ALL_ CLOSE;
44         
45         
46         QUIT; RUN;
47         &lt;/PRE&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="before" style="width: 627px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/65447i90E2F3E4B95FA8D1/image-size/large?v=v2&amp;amp;px=999" role="button" title="Image1.png" alt="before" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;before&lt;/span&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="after" style="width: 627px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/65448iAE5A3C794CA2EB25/image-size/large?v=v2&amp;amp;px=999" role="button" title="Image2.png" alt="after" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;after&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 05 Nov 2021 13:51:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-date/m-p/778775#M247936</guid>
      <dc:creator>fox96</dc:creator>
      <dc:date>2021-11-05T13:51:34Z</dc:date>
    </item>
    <item>
      <title>Re: SAS date</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-date/m-p/778780#M247938</link>
      <description>I have tried that method, and it also gave me an empty column.I loaded my dataset on the forum so you can see.</description>
      <pubDate>Fri, 05 Nov 2021 14:09:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-date/m-p/778780#M247938</guid>
      <dc:creator>fox96</dc:creator>
      <dc:date>2021-11-05T14:09:00Z</dc:date>
    </item>
    <item>
      <title>Re: SAS date</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-date/m-p/778799#M247945</link>
      <description>&lt;P&gt;What I suspected. You don't have dates, you have strings that look like dates. Do this:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;month = month(input(Date,monyy7.));
year = year(input(Date,monyy7.));&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Or, even better, read the data as dates when it arrives in SAS; how you do this depends on the type of data source.&lt;/P&gt;</description>
      <pubDate>Fri, 05 Nov 2021 15:16:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-date/m-p/778799#M247945</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2021-11-05T15:16:08Z</dc:date>
    </item>
  </channel>
</rss>

