<?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: Date Functions in SAS in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Date-Functions-in-SAS/m-p/114726#M23617</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Karun: You can find a nice discussion about whether periods should or shouldn't be used at:&lt;/P&gt;&lt;P&gt;&lt;A class="active_link" href="http://www.sascommunity.org/wiki/Macro_Programming_Best_Practices:_Styles,_Guidelines_and_Conventions_Including_the_Rationale_Behind_Them"&gt;http://www.sascommunity.org/wiki/Macro_Programming_Best_Practices:_Styles,_Guidelines_and_Conventions_Including_the_Rationale_Behind_Them&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With the functions you mentioned you can also specify the length and number of decimal places in two additional fields to the right of the two you already used.&amp;nbsp; If you include those values they will override any values you may have used in specifying the informat to use.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 01 Nov 2012 18:49:13 GMT</pubDate>
    <dc:creator>art297</dc:creator>
    <dc:date>2012-11-01T18:49:13Z</dc:date>
    <item>
      <title>Date Functions in SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Date-Functions-in-SAS/m-p/114725#M23616</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;Dear TEam,&lt;/P&gt;&lt;P&gt;I have a little difficulty in understanding this topic from the paper mentioned below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://analytics.ncsu.edu/sesug/2006/SC11_06.PDF" title="http://analytics.ncsu.edu/sesug/2006/SC11_06.PDF"&gt;http://analytics.ncsu.edu/sesug/2006/SC11_06.PDF&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Question1:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Is it true that when we use functions in Macro there is no trailing period after the name of the format??(theory on page 3 of the above paper says there is no need!!!!)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;"The other thing of significance is that the informat and&lt;/P&gt;&lt;P&gt;format used in the InputN and PutN can be any valid SAS informat or format and there is no trailing&lt;/P&gt;&lt;P&gt;decimal."&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I get the answer anyways with or without using the dot after the format name!!!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt; %let Date = &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: Courier New;"&gt;%Sysfunc&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;( InputN( 01JAN2006 , Date9. ) ) ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt; %put &amp;amp;Date;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;Regards&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Nov 2012 18:41:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Date-Functions-in-SAS/m-p/114725#M23616</guid>
      <dc:creator>robertrao</dc:creator>
      <dc:date>2012-11-01T18:41:11Z</dc:date>
    </item>
    <item>
      <title>Re: Date Functions in SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Date-Functions-in-SAS/m-p/114726#M23617</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Karun: You can find a nice discussion about whether periods should or shouldn't be used at:&lt;/P&gt;&lt;P&gt;&lt;A class="active_link" href="http://www.sascommunity.org/wiki/Macro_Programming_Best_Practices:_Styles,_Guidelines_and_Conventions_Including_the_Rationale_Behind_Them"&gt;http://www.sascommunity.org/wiki/Macro_Programming_Best_Practices:_Styles,_Guidelines_and_Conventions_Including_the_Rationale_Behind_Them&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With the functions you mentioned you can also specify the length and number of decimal places in two additional fields to the right of the two you already used.&amp;nbsp; If you include those values they will override any values you may have used in specifying the informat to use.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Nov 2012 18:49:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Date-Functions-in-SAS/m-p/114726#M23617</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2012-11-01T18:49:13Z</dc:date>
    </item>
    <item>
      <title>Re: Date Functions in SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Date-Functions-in-SAS/m-p/114727#M23618</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The period or dot used with a format name is a parsing character.&amp;nbsp; It is needed so that the parser can detect a difference between a format name and a variable name.&amp;nbsp; In the macro language this is not necessary as there are no data set variables, only macro language elements (that start with a macro language trigger - &amp;amp; and %), and non macro language elements, which don't start with a trigger.&amp;nbsp; functions such as the INPUT function know that the second argument is a format, so in the macro language the period is not necessary.&amp;nbsp; I suspect that we should be grateful that the periods don't cause problems.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Nov 2012 18:50:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Date-Functions-in-SAS/m-p/114727#M23618</guid>
      <dc:creator>ArtC</dc:creator>
      <dc:date>2012-11-01T18:50:57Z</dc:date>
    </item>
    <item>
      <title>Re: Date Functions in SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Date-Functions-in-SAS/m-p/114728#M23619</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks both of you for the response. Did u try it and see for yourself the above example i posted with a period and without after the Date&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Nov 2012 19:05:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Date-Functions-in-SAS/m-p/114728#M23619</guid>
      <dc:creator>robertrao</dc:creator>
      <dc:date>2012-11-01T19:05:17Z</dc:date>
    </item>
    <item>
      <title>Re: Date Functions in SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Date-Functions-in-SAS/m-p/114729#M23620</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Karun,&amp;nbsp; Of course I tried it (but not until after you asked if I had)!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Surprised that you weren't surprised that neither the value, nor the informat, could have quotes around them.&amp;nbsp; The exact opposite is required in open code.&amp;nbsp; e.g.:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data have;&lt;/P&gt;&lt;P&gt;&amp;nbsp; input stuff $9.;&lt;/P&gt;&lt;P&gt;&amp;nbsp; date=inputn(stuff,"date9.");&lt;/P&gt;&lt;P&gt;&amp;nbsp; date2=InputN( "01JAN2006" , "Date9." );&lt;/P&gt;&lt;P&gt;&amp;nbsp; cards;&lt;/P&gt;&lt;P&gt;10jan2012&lt;/P&gt;&lt;P&gt;1nov2012&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;%let Date = %Sysfunc( InputN( 01JAN2006 , Date,9 ) ) ;&lt;/P&gt;&lt;P&gt;%put &amp;amp;date.;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Nov 2012 19:27:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Date-Functions-in-SAS/m-p/114729#M23620</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2012-11-01T19:27:09Z</dc:date>
    </item>
    <item>
      <title>Re: Date Functions in SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Date-Functions-in-SAS/m-p/114730#M23621</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I agree wid you altogether. I was reading about it too from the same paper I posted......&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;"Remember that the macro facility considers everything not&lt;/P&gt;&lt;P&gt;preceded by a % or &amp;amp; to be text, which is different from the data step where words have meaning and we&lt;/P&gt;&lt;P&gt;quote the words we want to be considered as text."&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Nov 2012 19:32:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Date-Functions-in-SAS/m-p/114730#M23621</guid>
      <dc:creator>robertrao</dc:creator>
      <dc:date>2012-11-01T19:32:33Z</dc:date>
    </item>
  </channel>
</rss>

