<?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 Question in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/SAS-Date-Question/m-p/12947#M1785</link>
    <description>It depends on the technique you are using to display the "formatted" date.  If you assign a SAS DATE (numeric) variable using today(), then you would use a FORMAT statement in your program with the desired output format specified for your variable, as shown below:&lt;BR /&gt;
&lt;BR /&gt;
mydate = today();&lt;BR /&gt;
format mydate mmddyys10.;&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
And, if you are using a SAS macro variable, you must run the SAS-generate text with a function, as shown below:&lt;BR /&gt;
&lt;BR /&gt;
TITLE2 "RUN DATE: %SYSFUNC(TODAY(),MMDDYYS10.)";&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.</description>
    <pubDate>Fri, 06 Nov 2009 00:35:49 GMT</pubDate>
    <dc:creator>sbb</dc:creator>
    <dc:date>2009-11-06T00:35:49Z</dc:date>
    <item>
      <title>SAS Date Question</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/SAS-Date-Question/m-p/12946#M1784</link>
      <description>Hello Everyone,&lt;BR /&gt;
&lt;BR /&gt;
I am trying to put today's date in an output field in the format of mm/dd/yyyy or mm/dd/yy.  &lt;BR /&gt;
&lt;BR /&gt;
If I use today() i get a sas date.  But i am not sure how to convert it to the formats above.&lt;BR /&gt;
&lt;BR /&gt;
Thank you so much for any input!</description>
      <pubDate>Thu, 05 Nov 2009 22:02:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/SAS-Date-Question/m-p/12946#M1784</guid>
      <dc:creator>KevinC_</dc:creator>
      <dc:date>2009-11-05T22:02:57Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Date Question</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/SAS-Date-Question/m-p/12947#M1785</link>
      <description>It depends on the technique you are using to display the "formatted" date.  If you assign a SAS DATE (numeric) variable using today(), then you would use a FORMAT statement in your program with the desired output format specified for your variable, as shown below:&lt;BR /&gt;
&lt;BR /&gt;
mydate = today();&lt;BR /&gt;
format mydate mmddyys10.;&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
And, if you are using a SAS macro variable, you must run the SAS-generate text with a function, as shown below:&lt;BR /&gt;
&lt;BR /&gt;
TITLE2 "RUN DATE: %SYSFUNC(TODAY(),MMDDYYS10.)";&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.</description>
      <pubDate>Fri, 06 Nov 2009 00:35:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/SAS-Date-Question/m-p/12947#M1785</guid>
      <dc:creator>sbb</dc:creator>
      <dc:date>2009-11-06T00:35:49Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Date Question</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/SAS-Date-Question/m-p/12948#M1786</link>
      <description>Thank you so much, Scott!  That worked beautifully &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;</description>
      <pubDate>Fri, 06 Nov 2009 14:26:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/SAS-Date-Question/m-p/12948#M1786</guid>
      <dc:creator>KevinC_</dc:creator>
      <dc:date>2009-11-06T14:26:35Z</dc:date>
    </item>
  </channel>
</rss>

