<?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 the . at the end of date formats in macro variable is not necessary in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/the-at-the-end-of-date-formats-in-macro-variable-is-not/m-p/83713#M18069</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Macro Experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I just found out that the &lt;SPAN style="text-decoration: underline;"&gt;&lt;SPAN style="color: #ff0000; text-decoration: underline;"&gt;.&lt;/SPAN&gt;&lt;/SPAN&gt; is not necessary in format &lt;SPAN style="text-decoration: underline;"&gt;&lt;SPAN style="color: #ff0000; text-decoration: underline;"&gt;date9.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;%let startdate = "30apr2012"d;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;%let myfriday="%sysfunc(intnx(week.6,&amp;amp;startdate,0,b),&lt;SPAN style="color: #ff0000;"&gt;date9&lt;/SPAN&gt;)"d;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;%put myfriday: &amp;amp;myfriday;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;Is this true in all sas versions or just in newer version?&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;Thanks - Linlin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 14 Apr 2012 12:23:36 GMT</pubDate>
    <dc:creator>Linlin</dc:creator>
    <dc:date>2012-04-14T12:23:36Z</dc:date>
    <item>
      <title>the . at the end of date formats in macro variable is not necessary</title>
      <link>https://communities.sas.com/t5/SAS-Programming/the-at-the-end-of-date-formats-in-macro-variable-is-not/m-p/83713#M18069</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Macro Experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I just found out that the &lt;SPAN style="text-decoration: underline;"&gt;&lt;SPAN style="color: #ff0000; text-decoration: underline;"&gt;.&lt;/SPAN&gt;&lt;/SPAN&gt; is not necessary in format &lt;SPAN style="text-decoration: underline;"&gt;&lt;SPAN style="color: #ff0000; text-decoration: underline;"&gt;date9.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;%let startdate = "30apr2012"d;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;%let myfriday="%sysfunc(intnx(week.6,&amp;amp;startdate,0,b),&lt;SPAN style="color: #ff0000;"&gt;date9&lt;/SPAN&gt;)"d;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;%put myfriday: &amp;amp;myfriday;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;Is this true in all sas versions or just in newer version?&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;Thanks - Linlin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 14 Apr 2012 12:23:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/the-at-the-end-of-date-formats-in-macro-variable-is-not/m-p/83713#M18069</guid>
      <dc:creator>Linlin</dc:creator>
      <dc:date>2012-04-14T12:23:36Z</dc:date>
    </item>
    <item>
      <title>Re: the . at the end of date formats in macro variable is not necessary</title>
      <link>https://communities.sas.com/t5/SAS-Programming/the-at-the-end-of-date-formats-in-macro-variable-is-not/m-p/83714#M18070</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Linlin,&amp;nbsp; I think the correct answer is probably when did SAS start working correctly when inserting a format with an ending period into a macro statement?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Take a look at: &lt;A href="http://groups.google.com/group/comp.soft-sys.sas/browse_thread/thread/cb3007714d347151" title="http://groups.google.com/group/comp.soft-sys.sas/browse_thread/thread/cb3007714d347151"&gt;http://groups.google.com/group/comp.soft-sys.sas/browse_thread/thread/cb3007714d347151&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 14 Apr 2012 14:04:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/the-at-the-end-of-date-formats-in-macro-variable-is-not/m-p/83714#M18070</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2012-04-14T14:04:11Z</dc:date>
    </item>
    <item>
      <title>Re: the . at the end of date formats in macro variable is not necessary</title>
      <link>https://communities.sas.com/t5/SAS-Programming/the-at-the-end-of-date-formats-in-macro-variable-is-not/m-p/83715#M18071</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Art!&amp;nbsp; - Linlin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 14 Apr 2012 18:46:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/the-at-the-end-of-date-formats-in-macro-variable-is-not/m-p/83715#M18071</guid>
      <dc:creator>Linlin</dc:creator>
      <dc:date>2012-04-14T18:46:39Z</dc:date>
    </item>
    <item>
      <title>Re: the . at the end of date formats in macro variable is not necessary</title>
      <link>https://communities.sas.com/t5/SAS-Programming/the-at-the-end-of-date-formats-in-macro-variable-is-not/m-p/83716#M18072</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thank you Art,&lt;/P&gt;&lt;P&gt;for referring to an old posting of mine (it must be about 10 years old! your memory is good!)&lt;/P&gt;&lt;P&gt;the issue hasn't changed - people (mostly those who call themselves sas programmers) see a trailing dot and imagine "format".&lt;/P&gt;&lt;P&gt;In fact that dot is only needed when a format is used on a put statement (likewise for informat on input statement) - to allow the compiler to recognise that you are not referring to another variable.&lt;/P&gt;&lt;P&gt;Deeply embedded in the data step compiler, the PUT() function expects a dot in a format name, also.&lt;/P&gt;&lt;P&gt;However PUTN (and informats in inputn) function has no need of the dot, as only a format name (in a variable value) can appear in the second parameter of the function. Having third and 4th parameters for "total formatted width" and "number of decimal places", it is the tolerance and generous flexibility of the SAS lanugage compilers that accept the dot, width and num-dec-pl. in the value of the format parameter.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So it is not a defect of the macro environment that %sysfunc( {function}, {format} ) allows you to place DATE9 in that {format} position, but generous flexibility.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(I believe PUTN() was introduced with SAS/AF-SCL and is not PUT(), because they couldn't extract the underlying compiler code that implements PUT() in a practical way because of the way that code is implemented)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;peterC&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 15 Apr 2012 15:23:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/the-at-the-end-of-date-formats-in-macro-variable-is-not/m-p/83716#M18072</guid>
      <dc:creator>Peter_C</dc:creator>
      <dc:date>2012-04-15T15:23:30Z</dc:date>
    </item>
    <item>
      <title>Re: the . at the end of date formats in macro variable is not necessary</title>
      <link>https://communities.sas.com/t5/SAS-Programming/the-at-the-end-of-date-formats-in-macro-variable-is-not/m-p/83717#M18073</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Art and Peter,&lt;/P&gt;&lt;P&gt;I wish I had known you long time ago. Thank you very much for the detailed information. - Linlin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Apr 2012 01:05:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/the-at-the-end-of-date-formats-in-macro-variable-is-not/m-p/83717#M18073</guid>
      <dc:creator>Linlin</dc:creator>
      <dc:date>2012-04-16T01:05:44Z</dc:date>
    </item>
  </channel>
</rss>

