<?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 Append date to beginning of exported PDF file in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/append-date-to-beginning-of-exported-pdf-file/m-p/265737#M20444</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello all,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have searched the forums, help files, and python site for an answer to this question but could not find it as it relates to the "ExportToPDF" function.&amp;nbsp; Up to this point I have been relying on trial and error to get the dateTimeStamp in front of the filename with no success.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Currently, I have a script that creates and exports maps in a PDF format using the same name as the mxd followed by the dateTimeStamp.&amp;nbsp; What I would like to have is a filename that shows the date first (YYMMDD) followed by the name of the map document. For example,&amp;nbsp; 120315 Sewer Lines.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;How can this be accomplished?&amp;nbsp; Is there another script format that allows you to change the order of elements in filenames?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any help or insight is appreciated &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am using the following script:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;dateTimeStamp = time.strftime('%y%m%d') arcpy.mapping.ExportToPDF(mxd,r"S:\GIS Data\Scripts\Temp PDF\Sewer Lines" + dateTimeStamp + ".pdf")&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 15 Mar 2012 17:42:35 GMT</pubDate>
    <dc:creator>DrewSteffens1</dc:creator>
    <dc:date>2012-03-15T17:42:35Z</dc:date>
    <item>
      <title>Append date to beginning of exported PDF file</title>
      <link>https://community.esri.com/t5/python-questions/append-date-to-beginning-of-exported-pdf-file/m-p/265737#M20444</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello all,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have searched the forums, help files, and python site for an answer to this question but could not find it as it relates to the "ExportToPDF" function.&amp;nbsp; Up to this point I have been relying on trial and error to get the dateTimeStamp in front of the filename with no success.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Currently, I have a script that creates and exports maps in a PDF format using the same name as the mxd followed by the dateTimeStamp.&amp;nbsp; What I would like to have is a filename that shows the date first (YYMMDD) followed by the name of the map document. For example,&amp;nbsp; 120315 Sewer Lines.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;How can this be accomplished?&amp;nbsp; Is there another script format that allows you to change the order of elements in filenames?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any help or insight is appreciated &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am using the following script:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;dateTimeStamp = time.strftime('%y%m%d') arcpy.mapping.ExportToPDF(mxd,r"S:\GIS Data\Scripts\Temp PDF\Sewer Lines" + dateTimeStamp + ".pdf")&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Mar 2012 17:42:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/append-date-to-beginning-of-exported-pdf-file/m-p/265737#M20444</guid>
      <dc:creator>DrewSteffens1</dc:creator>
      <dc:date>2012-03-15T17:42:35Z</dc:date>
    </item>
    <item>
      <title>Re: Append date to beginning of exported PDF file</title>
      <link>https://community.esri.com/t5/python-questions/append-date-to-beginning-of-exported-pdf-file/m-p/265738#M20445</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Does this work?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;arcpy.mapping.ExportToPDF(mxd,r"S:\GIS Data\Scripts\Temp PDF\\"+dateTimeStamp+"sewerlines.pdf")&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Mar 2012 17:57:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/append-date-to-beginning-of-exported-pdf-file/m-p/265738#M20445</guid>
      <dc:creator>MathewCoyle</dc:creator>
      <dc:date>2012-03-15T17:57:06Z</dc:date>
    </item>
    <item>
      <title>Re: Append date to beginning of exported PDF file</title>
      <link>https://community.esri.com/t5/python-questions/append-date-to-beginning-of-exported-pdf-file/m-p/265739#M20446</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Works Perfectly!&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Mar 2012 18:25:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/append-date-to-beginning-of-exported-pdf-file/m-p/265739#M20446</guid>
      <dc:creator>DrewSteffens1</dc:creator>
      <dc:date>2012-03-15T18:25:02Z</dc:date>
    </item>
  </channel>
</rss>

