<?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: How do I get the date format changed to mmddyyyy in the proc export step in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/How-do-I-get-the-date-format-changed-to-mmddyyyy-in-the-proc/m-p/635407#M21290</link>
    <description>&lt;P&gt;Change the format in the CALL SYMPUT() to what you want it. Here you've specified date9, but I would recommend using yyyy.mm.dd which will sort correctly using ascending or descending.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;call symputx('datenow', put(date()-1, yymmddp10.));&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I also recommend changing to SYMPUTX which trims any extra spaces.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You also need to remove the single quotes in your outfile statement.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;outfile="\\SharedFolder\REPORT_&amp;amp;datenow..xlsx"&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 27 Mar 2020 18:28:11 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2020-03-27T18:28:11Z</dc:date>
    <item>
      <title>How do I get the date format changed to mmddyyyy in the proc export step</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-do-I-get-the-date-format-changed-to-mmddyyyy-in-the-proc/m-p/635406#M21289</link>
      <description>&lt;P&gt;data_null_;&lt;/P&gt;&lt;P&gt;call symput ('datenow', put((date()-1), date9.));&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc export data=mydata;&lt;/P&gt;&lt;P&gt;outfile="\\SharedFolder\REPORT_&amp;amp;'datenow'..xlsx"&lt;/P&gt;&lt;P&gt;dbms=xlsx replace;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;When I run this code, I am getting the date on the spreadsheet as REPORT_26MAR2020.xlsx&lt;/P&gt;&lt;P&gt;Would it be possible to get it in this format: REPORT_03.26.2020.xlsx&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 27 Mar 2020 18:18:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-do-I-get-the-date-format-changed-to-mmddyyyy-in-the-proc/m-p/635406#M21289</guid>
      <dc:creator>panopolix</dc:creator>
      <dc:date>2020-03-27T18:18:01Z</dc:date>
    </item>
    <item>
      <title>Re: How do I get the date format changed to mmddyyyy in the proc export step</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-do-I-get-the-date-format-changed-to-mmddyyyy-in-the-proc/m-p/635407#M21290</link>
      <description>&lt;P&gt;Change the format in the CALL SYMPUT() to what you want it. Here you've specified date9, but I would recommend using yyyy.mm.dd which will sort correctly using ascending or descending.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;call symputx('datenow', put(date()-1, yymmddp10.));&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I also recommend changing to SYMPUTX which trims any extra spaces.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You also need to remove the single quotes in your outfile statement.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;outfile="\\SharedFolder\REPORT_&amp;amp;datenow..xlsx"&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 27 Mar 2020 18:28:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-do-I-get-the-date-format-changed-to-mmddyyyy-in-the-proc/m-p/635407#M21290</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2020-03-27T18:28:11Z</dc:date>
    </item>
    <item>
      <title>Re: How do I get the date format changed to mmddyyyy in the proc export step</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-do-I-get-the-date-format-changed-to-mmddyyyy-in-the-proc/m-p/635409#M21291</link>
      <description>&lt;P&gt;Thank you Reeza! That works.&lt;/P&gt;</description>
      <pubDate>Fri, 27 Mar 2020 18:40:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-do-I-get-the-date-format-changed-to-mmddyyyy-in-the-proc/m-p/635409#M21291</guid>
      <dc:creator>panopolix</dc:creator>
      <dc:date>2020-03-27T18:40:45Z</dc:date>
    </item>
  </channel>
</rss>

