<?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: Exporting to PDF with a Unique Name in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/exporting-to-pdf-with-a-unique-name/m-p/69112#M5637</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;That works if you want year_Minutes_day_hour_minutes_seconds.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;If you want Month_Day_year, something like this works:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
&amp;gt;&amp;gt;&amp;gt; from time import strftime
&amp;gt;&amp;gt;&amp;gt; stamp = datetime.datetime.now().strftime("%Y_%M_%d_%H%M%S")
&amp;gt;&amp;gt;&amp;gt; stamp
'2013_56_30_155604'
&amp;gt;&amp;gt;&amp;gt; 
&amp;gt;&amp;gt;&amp;gt; dt = strftime("%m_%d_%Y %H:%M:%S")
&amp;gt;&amp;gt;&amp;gt; dt
'05_30_2013 15:56:17'
&amp;gt;&amp;gt;&amp;gt; 
&amp;gt;&amp;gt;&amp;gt; dt = strftime("%m_%d_%Y")
&amp;gt;&amp;gt;&amp;gt; dt
'05_30_2013'&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;R_&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 10 Dec 2021 22:38:51 GMT</pubDate>
    <dc:creator>RhettZufelt</dc:creator>
    <dc:date>2021-12-10T22:38:51Z</dc:date>
    <item>
      <title>Exporting to PDF with a Unique Name</title>
      <link>https://community.esri.com/t5/python-questions/exporting-to-pdf-with-a-unique-name/m-p/69109#M5634</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have a script that exports my .mxd to a .pdf and a .png and I would like to add a Unique Name to the exported maps so everytime the script runs the exports don't get overwritten. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I would like to have the date included in the exported documents name. My idea was to add time.asctime() to the title but I can't seem to get that to work.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any ideas would be very appreciated.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Josh&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 May 2013 12:47:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/exporting-to-pdf-with-a-unique-name/m-p/69109#M5634</guid>
      <dc:creator>joshwheeler1</dc:creator>
      <dc:date>2013-05-30T12:47:45Z</dc:date>
    </item>
    <item>
      <title>Re: Exporting to PDF with a Unique Name</title>
      <link>https://community.esri.com/t5/python-questions/exporting-to-pdf-with-a-unique-name/m-p/69110#M5635</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I usually do something like this.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;stamp = datetime.datetime.now().strftime("%Y_%M_%d_%H%M%S")&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 May 2013 14:13:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/exporting-to-pdf-with-a-unique-name/m-p/69110#M5635</guid>
      <dc:creator>MathewCoyle</dc:creator>
      <dc:date>2013-05-30T14:13:17Z</dc:date>
    </item>
    <item>
      <title>Re: Exporting to PDF with a Unique Name</title>
      <link>https://community.esri.com/t5/python-questions/exporting-to-pdf-with-a-unique-name/m-p/69111#M5636</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Just what I needed, thanks a lot.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 May 2013 15:19:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/exporting-to-pdf-with-a-unique-name/m-p/69111#M5636</guid>
      <dc:creator>joshwheeler1</dc:creator>
      <dc:date>2013-05-30T15:19:38Z</dc:date>
    </item>
    <item>
      <title>Re: Exporting to PDF with a Unique Name</title>
      <link>https://community.esri.com/t5/python-questions/exporting-to-pdf-with-a-unique-name/m-p/69112#M5637</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;That works if you want year_Minutes_day_hour_minutes_seconds.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;If you want Month_Day_year, something like this works:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
&amp;gt;&amp;gt;&amp;gt; from time import strftime
&amp;gt;&amp;gt;&amp;gt; stamp = datetime.datetime.now().strftime("%Y_%M_%d_%H%M%S")
&amp;gt;&amp;gt;&amp;gt; stamp
'2013_56_30_155604'
&amp;gt;&amp;gt;&amp;gt; 
&amp;gt;&amp;gt;&amp;gt; dt = strftime("%m_%d_%Y %H:%M:%S")
&amp;gt;&amp;gt;&amp;gt; dt
'05_30_2013 15:56:17'
&amp;gt;&amp;gt;&amp;gt; 
&amp;gt;&amp;gt;&amp;gt; dt = strftime("%m_%d_%Y")
&amp;gt;&amp;gt;&amp;gt; dt
'05_30_2013'&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;R_&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 22:38:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/exporting-to-pdf-with-a-unique-name/m-p/69112#M5637</guid>
      <dc:creator>RhettZufelt</dc:creator>
      <dc:date>2021-12-10T22:38:51Z</dc:date>
    </item>
    <item>
      <title>Re: Exporting to PDF with a Unique Name</title>
      <link>https://community.esri.com/t5/python-questions/exporting-to-pdf-with-a-unique-name/m-p/69113#M5638</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Ah yes small typo, rhett is right, should be %m for month. Though date formats are always year_month_day.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Jun 2013 12:10:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/exporting-to-pdf-with-a-unique-name/m-p/69113#M5638</guid>
      <dc:creator>MathewCoyle</dc:creator>
      <dc:date>2013-06-03T12:10:18Z</dc:date>
    </item>
    <item>
      <title>Re: Exporting to PDF with a Unique Name</title>
      <link>https://community.esri.com/t5/python-questions/exporting-to-pdf-with-a-unique-name/m-p/69114#M5639</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;strftime actually has a bunch of directives you can use.&amp;nbsp; See here for the list &lt;/SPAN&gt;&lt;A href="http://www.tutorialspoint.com/python/time_strftime.htm"&gt;http://www.tutorialspoint.com/python/time_strftime.htm&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;R_&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Jun 2013 18:31:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/exporting-to-pdf-with-a-unique-name/m-p/69114#M5639</guid>
      <dc:creator>RhettZufelt</dc:creator>
      <dc:date>2013-06-03T18:31:20Z</dc:date>
    </item>
  </channel>
</rss>

