<?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 SAS Date format for Start of the month in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/SAS-Date-format-for-Start-of-the-month/m-p/56709#M15857</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not sure if I'm doing the right thing, but getting an error msg, I think this maybe due to Nov end of month being today....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1 The SAS System 09:12 Wednesday, November 30, 2011&lt;/P&gt;&lt;P&gt;1 ;*';*";*/;quit;run;&lt;/P&gt;&lt;P&gt;2 OPTIONS PAGENO=MIN;&lt;/P&gt;&lt;P&gt;3 %LET _CLIENTTASKLABEL=%NRBQUOTE(Code1);&lt;/P&gt;&lt;P&gt;4 %LET _EGTASKLABEL=%NRBQUOTE(Code1);&lt;/P&gt;&lt;P&gt;5 %LET _CLIENTPROJECTNAME=%NRBQUOTE();&lt;/P&gt;&lt;P&gt;6 %LET _SASPROGRAMFILE=;&lt;/P&gt;&lt;P&gt;7 &lt;/P&gt;&lt;P&gt;8 ODS _ALL_ CLOSE;&lt;/P&gt;&lt;P&gt;NOTE: Some of your options or statements may not be supported with the Activex or Java series of devices. Graph defaults for these &lt;/P&gt;&lt;P&gt;drivers may be different from other SAS/GRAPH device drivers. For further information, please contact Technical Support.&lt;/P&gt;&lt;P&gt;9 OPTIONS DEV=ACTIVEX;&lt;/P&gt;&lt;P&gt;10 FILENAME EGHTML TEMP;&lt;/P&gt;&lt;P&gt;NOTE: Writing HTML(EGHTML) Body file: EGHTML&lt;/P&gt;&lt;P&gt;11 ODS HTML(ID=EGHTML) FILE=EGHTML ENCODING='utf-8' STYLE=EGDefault&lt;/P&gt;&lt;P&gt;11 ! STYLESHEET=(URL="file:///C:/Program%20Files/SAS/Shared%20Files/BIClientStyles/EGDefault.css")&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;11 ! ATTRIBUTES=("CODEBASE"="&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://www2.sas.com/codebase/graph/v91/sasgraph.exe"&gt;http://www2.sas.com/codebase/graph/v91/sasgraph.exe&lt;/A&gt;&lt;SPAN&gt;") NOGTITLE NOGFOOTNOTE GPATH=&amp;amp;sasworklocation&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;11 ! ;&lt;/P&gt;&lt;P&gt;12 &lt;/P&gt;&lt;P&gt;13 %gaccessible;&lt;/P&gt;&lt;P&gt;14 %put &amp;amp;thismonthstart;&lt;/P&gt;&lt;P&gt;01NOV2011&lt;/P&gt;&lt;P&gt;15 DATA _tNULL_;&lt;/P&gt;&lt;P&gt;16 format mth lstmth $6. dt1 date9. dt2 date9. monthend1 date9.;&lt;/P&gt;&lt;P&gt;17 DT1=intnx('week.6',intnx('month',&amp;amp;ThisMonthStart.,0,'end'),0);&lt;/P&gt;&lt;P&gt;_____&lt;/P&gt;&lt;P&gt;72&lt;/P&gt;&lt;P&gt;NOTE: Line generated by the macro variable "THISMONTHSTART".&lt;/P&gt;&lt;P&gt;17 01NOV2011&lt;/P&gt;&lt;P&gt;_______&lt;/P&gt;&lt;P&gt;22&lt;/P&gt;&lt;P&gt;18 DT2=intnx('week.6',intnx('month',&amp;amp;ThisMonthStart.,-1,'end'),0);&lt;/P&gt;&lt;P&gt;_____&lt;/P&gt;&lt;P&gt;72&lt;/P&gt;&lt;P&gt;NOTE: Line generated by the macro variable "THISMONTHSTART".&lt;/P&gt;&lt;P&gt;18 01NOV2011&lt;/P&gt;&lt;P&gt;_______&lt;/P&gt;&lt;P&gt;22&lt;/P&gt;&lt;P&gt;19 MonthEnd1=intnx('month',&amp;amp;ThisMonthStart.,0,'end');&lt;/P&gt;&lt;P&gt;_____&lt;/P&gt;&lt;P&gt;72&lt;/P&gt;&lt;P&gt;NOTE: Line generated by the macro variable "THISMONTHSTART".&lt;/P&gt;&lt;P&gt;19 01NOV2011&lt;/P&gt;&lt;P&gt;_______&lt;/P&gt;&lt;P&gt;22&lt;/P&gt;&lt;P&gt;ERROR 72-185: The INTNX function call has too many arguments.&lt;/P&gt;&lt;P&gt;ERROR 22-322: Syntax error, expecting one of the following: !, !!, &amp;amp;, *, **, +, ',', -, /, &amp;lt;, &amp;lt;=, &amp;lt;&amp;gt;, =, &amp;gt;, &amp;gt;&amp;lt;, &amp;gt;=, AND, EQ, GE, &lt;/P&gt;&lt;P&gt;GT, IN, LE, LT, MAX, MIN, NE, NG, NL, NOTIN, OR, ^=, |, ||, ~=. &lt;/P&gt;&lt;P&gt;20 Mth=COMPRESS(year(dt1)*100+month(dt1));&lt;/P&gt;&lt;P&gt;21 Lstmth=COMPRESS(year(DT2)*100+month(DT2));&lt;/P&gt;&lt;P&gt;22 output;&lt;/P&gt;&lt;P&gt;23 CALL symput("rpt",mth);&lt;/P&gt;&lt;P&gt;24 CALL symput("prerpt",Lstmth);&lt;/P&gt;&lt;P&gt;25 call symput("ThisMonthEnd",monthend1);&lt;/P&gt;&lt;P&gt;26 run;&lt;/P&gt;&lt;P&gt;NOTE: Numeric values have been converted to character values at the places given by: (Line):(Column).&lt;/P&gt;&lt;P&gt;2 The SAS System 09:12 Wednesday, November 30, 2011&lt;/P&gt;&lt;P&gt;17:51 18:51 19:42 20:27 21:30 25:28 &lt;/P&gt;&lt;P&gt;NOTE: The SAS System stopped processing this step because of errors.&lt;/P&gt;&lt;P&gt;WARNING: The data set WORK._TNULL_ may be incomplete. When this step was stopped there were 0 observations and 6 variables.&lt;/P&gt;&lt;P&gt;WARNING: Data set WORK._TNULL_ was not replaced because this step was stopped.&lt;/P&gt;&lt;P&gt;NOTE: DATA statement used (Total process time):&lt;/P&gt;&lt;P&gt;real time 0.00 seconds&lt;/P&gt;&lt;P&gt;cpu time 0.00 seconds&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;27 &lt;/P&gt;&lt;P&gt;28 &lt;/P&gt;&lt;P&gt;29 %LET _CLIENTTASKLABEL=;&lt;/P&gt;&lt;P&gt;30 %LET _EGTASKLABEL=;&lt;/P&gt;&lt;P&gt;31 %LET _CLIENTPROJECTNAME=;&lt;/P&gt;&lt;P&gt;32 %LET _SASPROGRAMFILE=;&lt;/P&gt;&lt;P&gt;33 &lt;/P&gt;&lt;P&gt;34 ;*';*";*/;quit;run;&lt;/P&gt;&lt;P&gt;35 ODS _ALL_ CLOSE;&lt;/P&gt;&lt;P&gt;36 &lt;/P&gt;&lt;P&gt;37 &lt;/P&gt;&lt;P&gt;38 QUIT; RUN;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 30 Nov 2011 00:03:38 GMT</pubDate>
    <dc:creator>Wickywick</dc:creator>
    <dc:date>2011-11-30T00:03:38Z</dc:date>
    <item>
      <title>SAS Date format for Start of the month</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/SAS-Date-format-for-Start-of-the-month/m-p/56705#M15853</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have the below code to format the date for a monthly job im running however I can not automate this job as each month I have to change the &lt;STRONG&gt;"%Let ThisMonthStart=" &lt;/STRONG&gt;with the 1st day of the month.&lt;/P&gt;&lt;P&gt;I want to know how I can get this autoformatted so I can automate this job, I have attached the bit of code that I use to calculate the other dates that are used in this job.&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: Courier New;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;%let ThisMonthStart='01Oct2011'd; /*** The Start Date Of the Month Needs To Be Changed ***/&lt;/P&gt;&lt;P&gt;DATA _NULL_;&lt;/P&gt;&lt;P&gt;format mth lstmth $6. dt1 date9. dt2 date9. monthend1 date9.;&lt;/P&gt;&lt;P&gt;DT1=intnx('week.6',intnx('month',&amp;amp;ThisMonthStart.,0,'end'),0);&lt;/P&gt;&lt;P&gt;DT2=intnx('week.6',intnx('month',&amp;amp;ThisMonthStart.,-1,'end'),0);&lt;/P&gt;&lt;P&gt;MonthEnd1=intnx('month',&amp;amp;ThisMonthStart.,0,'end');&lt;/P&gt;&lt;P&gt;Mth=COMPRESS(year(dt1)*100+month(dt1));&lt;/P&gt;&lt;P&gt;Lstmth=COMPRESS(year(DT2)*100+month(DT2));&lt;/P&gt;&lt;P&gt;output;&lt;/P&gt;&lt;P&gt;CALL symput("rpt",mth);&lt;/P&gt;&lt;P&gt;CALL symput("prerpt",Lstmth);&lt;/P&gt;&lt;P&gt;call symput("ThisMonthEnd",monthend1);&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I could use some help on how I can achieve the above as it would free up a lot of my time.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cheers&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;SPAN&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;SPAN&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;SPAN&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;SPAN&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Nov 2011 22:26:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/SAS-Date-format-for-Start-of-the-month/m-p/56705#M15853</guid>
      <dc:creator>Wickywick</dc:creator>
      <dc:date>2011-11-29T22:26:06Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Date format for Start of the month</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/SAS-Date-format-for-Start-of-the-month/m-p/56706#M15854</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;%let thismonthstart=%sysfunc(intnx(month,%sysfunc(today()),0,beginning),date9.);&lt;/P&gt;&lt;P&gt;%put &amp;amp;thismonthstart;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;01NOV2011&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you want to use it as the numeric value remove ,date9. from the statement above:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;18932&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or you could call it like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;"&amp;amp;thismonthstart"d&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Nov 2011 22:52:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/SAS-Date-format-for-Start-of-the-month/m-p/56706#M15854</guid>
      <dc:creator>FriedEgg</dc:creator>
      <dc:date>2011-11-29T22:52:35Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Date format for Start of the month</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/SAS-Date-format-for-Start-of-the-month/m-p/56707#M15855</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; FriesEgg provides the answer. &lt;/P&gt;&lt;P&gt;Only slightly reduced, an alternative is&lt;/P&gt;&lt;P&gt;%let thisMonthStart = %sysfunc( intnx( month, "&amp;amp;sysdate"d, 0 ), date9 );&lt;/P&gt;&lt;P&gt; which provides the beginning of the month in which the SAS job starts&lt;/P&gt;&lt;P&gt;Use it like&lt;/P&gt;&lt;P&gt;where transaction_date GE "&amp;amp;thisMonthStart"d &lt;/P&gt;&lt;P&gt;or &lt;/P&gt;&lt;P&gt;where timeStamp &amp;gt;= "&amp;amp;thisMonthStart:0:0:0"dt &lt;/P&gt;&lt;P&gt;when you are testing against a date-time value&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Nov 2011 23:19:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/SAS-Date-format-for-Start-of-the-month/m-p/56707#M15855</guid>
      <dc:creator>Peter_C</dc:creator>
      <dc:date>2011-11-29T23:19:11Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Date format for Start of the month</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/SAS-Date-format-for-Start-of-the-month/m-p/56708#M15856</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Peter,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That can turn out to be quite problematic as I have seen many situations where a SAS session had actually been started a number of months before a particular program was run.&amp;nbsp; Scarry, maybe, but true.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Nov 2011 23:24:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/SAS-Date-format-for-Start-of-the-month/m-p/56708#M15856</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2011-11-29T23:24:18Z</dc:date>
    </item>
    <item>
      <title>SAS Date format for Start of the month</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/SAS-Date-format-for-Start-of-the-month/m-p/56709#M15857</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not sure if I'm doing the right thing, but getting an error msg, I think this maybe due to Nov end of month being today....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1 The SAS System 09:12 Wednesday, November 30, 2011&lt;/P&gt;&lt;P&gt;1 ;*';*";*/;quit;run;&lt;/P&gt;&lt;P&gt;2 OPTIONS PAGENO=MIN;&lt;/P&gt;&lt;P&gt;3 %LET _CLIENTTASKLABEL=%NRBQUOTE(Code1);&lt;/P&gt;&lt;P&gt;4 %LET _EGTASKLABEL=%NRBQUOTE(Code1);&lt;/P&gt;&lt;P&gt;5 %LET _CLIENTPROJECTNAME=%NRBQUOTE();&lt;/P&gt;&lt;P&gt;6 %LET _SASPROGRAMFILE=;&lt;/P&gt;&lt;P&gt;7 &lt;/P&gt;&lt;P&gt;8 ODS _ALL_ CLOSE;&lt;/P&gt;&lt;P&gt;NOTE: Some of your options or statements may not be supported with the Activex or Java series of devices. Graph defaults for these &lt;/P&gt;&lt;P&gt;drivers may be different from other SAS/GRAPH device drivers. For further information, please contact Technical Support.&lt;/P&gt;&lt;P&gt;9 OPTIONS DEV=ACTIVEX;&lt;/P&gt;&lt;P&gt;10 FILENAME EGHTML TEMP;&lt;/P&gt;&lt;P&gt;NOTE: Writing HTML(EGHTML) Body file: EGHTML&lt;/P&gt;&lt;P&gt;11 ODS HTML(ID=EGHTML) FILE=EGHTML ENCODING='utf-8' STYLE=EGDefault&lt;/P&gt;&lt;P&gt;11 ! STYLESHEET=(URL="file:///C:/Program%20Files/SAS/Shared%20Files/BIClientStyles/EGDefault.css")&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;11 ! ATTRIBUTES=("CODEBASE"="&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://www2.sas.com/codebase/graph/v91/sasgraph.exe"&gt;http://www2.sas.com/codebase/graph/v91/sasgraph.exe&lt;/A&gt;&lt;SPAN&gt;") NOGTITLE NOGFOOTNOTE GPATH=&amp;amp;sasworklocation&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;11 ! ;&lt;/P&gt;&lt;P&gt;12 &lt;/P&gt;&lt;P&gt;13 %gaccessible;&lt;/P&gt;&lt;P&gt;14 %put &amp;amp;thismonthstart;&lt;/P&gt;&lt;P&gt;01NOV2011&lt;/P&gt;&lt;P&gt;15 DATA _tNULL_;&lt;/P&gt;&lt;P&gt;16 format mth lstmth $6. dt1 date9. dt2 date9. monthend1 date9.;&lt;/P&gt;&lt;P&gt;17 DT1=intnx('week.6',intnx('month',&amp;amp;ThisMonthStart.,0,'end'),0);&lt;/P&gt;&lt;P&gt;_____&lt;/P&gt;&lt;P&gt;72&lt;/P&gt;&lt;P&gt;NOTE: Line generated by the macro variable "THISMONTHSTART".&lt;/P&gt;&lt;P&gt;17 01NOV2011&lt;/P&gt;&lt;P&gt;_______&lt;/P&gt;&lt;P&gt;22&lt;/P&gt;&lt;P&gt;18 DT2=intnx('week.6',intnx('month',&amp;amp;ThisMonthStart.,-1,'end'),0);&lt;/P&gt;&lt;P&gt;_____&lt;/P&gt;&lt;P&gt;72&lt;/P&gt;&lt;P&gt;NOTE: Line generated by the macro variable "THISMONTHSTART".&lt;/P&gt;&lt;P&gt;18 01NOV2011&lt;/P&gt;&lt;P&gt;_______&lt;/P&gt;&lt;P&gt;22&lt;/P&gt;&lt;P&gt;19 MonthEnd1=intnx('month',&amp;amp;ThisMonthStart.,0,'end');&lt;/P&gt;&lt;P&gt;_____&lt;/P&gt;&lt;P&gt;72&lt;/P&gt;&lt;P&gt;NOTE: Line generated by the macro variable "THISMONTHSTART".&lt;/P&gt;&lt;P&gt;19 01NOV2011&lt;/P&gt;&lt;P&gt;_______&lt;/P&gt;&lt;P&gt;22&lt;/P&gt;&lt;P&gt;ERROR 72-185: The INTNX function call has too many arguments.&lt;/P&gt;&lt;P&gt;ERROR 22-322: Syntax error, expecting one of the following: !, !!, &amp;amp;, *, **, +, ',', -, /, &amp;lt;, &amp;lt;=, &amp;lt;&amp;gt;, =, &amp;gt;, &amp;gt;&amp;lt;, &amp;gt;=, AND, EQ, GE, &lt;/P&gt;&lt;P&gt;GT, IN, LE, LT, MAX, MIN, NE, NG, NL, NOTIN, OR, ^=, |, ||, ~=. &lt;/P&gt;&lt;P&gt;20 Mth=COMPRESS(year(dt1)*100+month(dt1));&lt;/P&gt;&lt;P&gt;21 Lstmth=COMPRESS(year(DT2)*100+month(DT2));&lt;/P&gt;&lt;P&gt;22 output;&lt;/P&gt;&lt;P&gt;23 CALL symput("rpt",mth);&lt;/P&gt;&lt;P&gt;24 CALL symput("prerpt",Lstmth);&lt;/P&gt;&lt;P&gt;25 call symput("ThisMonthEnd",monthend1);&lt;/P&gt;&lt;P&gt;26 run;&lt;/P&gt;&lt;P&gt;NOTE: Numeric values have been converted to character values at the places given by: (Line):(Column).&lt;/P&gt;&lt;P&gt;2 The SAS System 09:12 Wednesday, November 30, 2011&lt;/P&gt;&lt;P&gt;17:51 18:51 19:42 20:27 21:30 25:28 &lt;/P&gt;&lt;P&gt;NOTE: The SAS System stopped processing this step because of errors.&lt;/P&gt;&lt;P&gt;WARNING: The data set WORK._TNULL_ may be incomplete. When this step was stopped there were 0 observations and 6 variables.&lt;/P&gt;&lt;P&gt;WARNING: Data set WORK._TNULL_ was not replaced because this step was stopped.&lt;/P&gt;&lt;P&gt;NOTE: DATA statement used (Total process time):&lt;/P&gt;&lt;P&gt;real time 0.00 seconds&lt;/P&gt;&lt;P&gt;cpu time 0.00 seconds&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;27 &lt;/P&gt;&lt;P&gt;28 &lt;/P&gt;&lt;P&gt;29 %LET _CLIENTTASKLABEL=;&lt;/P&gt;&lt;P&gt;30 %LET _EGTASKLABEL=;&lt;/P&gt;&lt;P&gt;31 %LET _CLIENTPROJECTNAME=;&lt;/P&gt;&lt;P&gt;32 %LET _SASPROGRAMFILE=;&lt;/P&gt;&lt;P&gt;33 &lt;/P&gt;&lt;P&gt;34 ;*';*";*/;quit;run;&lt;/P&gt;&lt;P&gt;35 ODS _ALL_ CLOSE;&lt;/P&gt;&lt;P&gt;36 &lt;/P&gt;&lt;P&gt;37 &lt;/P&gt;&lt;P&gt;38 QUIT; RUN;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Nov 2011 00:03:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/SAS-Date-format-for-Start-of-the-month/m-p/56709#M15857</guid>
      <dc:creator>Wickywick</dc:creator>
      <dc:date>2011-11-30T00:03:38Z</dc:date>
    </item>
    <item>
      <title>SAS Date format for Start of the month</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/SAS-Date-format-for-Start-of-the-month/m-p/56710#M15858</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;proc format;&lt;/P&gt;&lt;P&gt; picture fom (default=9) other='01%b%Y' (datatype=date);&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%let thismonthstart=%sysfunc(today(),fom.);&lt;/P&gt;&lt;P&gt;*or %let thismonthstart=%sysfunc(intnx(month,&amp;amp;sysfunc(today),0),date9.);&lt;/P&gt;&lt;P&gt;%put &amp;amp;thismonthstart;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data _null_;&lt;/P&gt;&lt;P&gt; dt1=intnx('week.6',intnx('month',"&amp;amp;thismonthstart"d,0,'end'),0);&lt;/P&gt;&lt;P&gt; put dt1;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Nov 2011 00:11:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/SAS-Date-format-for-Start-of-the-month/m-p/56710#M15858</guid>
      <dc:creator>FriedEgg</dc:creator>
      <dc:date>2011-11-30T00:11:47Z</dc:date>
    </item>
    <item>
      <title>SAS Date format for Start of the month</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/SAS-Date-format-for-Start-of-the-month/m-p/56711#M15859</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You have generated a macro variable (always a character string) with 01NOV2011 as its value.&lt;/P&gt;&lt;P&gt;To use that as a date literal in the SAS code you need quote it and append the letter D.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MonthEnd1=intnx('month',"&amp;amp;ThisMonthStart"d,0,'end');&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Nov 2011 00:48:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/SAS-Date-format-for-Start-of-the-month/m-p/56711#M15859</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2011-11-30T00:48:25Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Date format for Start of the month</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/SAS-Date-format-for-Start-of-the-month/m-p/56712#M15860</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Art&lt;/P&gt;&lt;P&gt;scary!:smileyalert:&lt;/P&gt;&lt;P&gt;and simply needs &amp;amp;sysdate replaced as demonstrated by others, with&lt;/P&gt;&lt;P&gt;%sysfunc( today(), date9) &lt;/P&gt;&lt;P&gt;peter&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Nov 2011 17:17:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/SAS-Date-format-for-Start-of-the-month/m-p/56712#M15860</guid>
      <dc:creator>Peter_C</dc:creator>
      <dc:date>2011-11-30T17:17:39Z</dc:date>
    </item>
  </channel>
</rss>

