<?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 Including the date in an Output Feature Class filename using Model Builder in ModelBuilder Questions</title>
    <link>https://community.esri.com/t5/modelbuilder-questions/including-the-date-in-an-output-feature-class/m-p/780137#M2935</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So simply put, I'm trying to use the Feature Class to Feature Class tool and as a part of the output feature class (going into a GDB), I want to include the current date. I've tried using the following text in the Output Feature Class field but alas the tool crashes;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Output_%Date%&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any suggestions on where I'm going wrong? The aim is to build up a list of feature classes that can be compared using a different model later on to track changes between versions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="212114" alt="Output Date in Name.jpg" class="image-1 jive-image" src="/legacyfs/online/212114_Output Date in Name.jpg" style="width: 620px; height: 461px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #e23d39;"&gt;&lt;EM style="text-decoration: underline;"&gt;&lt;STRONG&gt;UPDATE&lt;/STRONG&gt;&lt;/EM&gt;&lt;/SPAN&gt;: &lt;SPAN style="color: #3d3d3d; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;OK, So I figured out that I needed to create the Date Variable to start with which I have done. My next issue is that it won't work because the date contains 2 slashes ( 18/07/2016 ). What would be the best way of getting this converted to a text element that can replace the / with an _ and maybe even reorder the numbers in reverse (e.g. Output_2016_07_18).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;&lt;IMG __jive_id="212112" alt="Output Date in Name with Variable.jpg" class="image-2 jive-image" src="/legacyfs/online/212112_Output Date in Name with Variable.jpg" style="width: 620px; height: 401px;" /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 18 Jul 2016 03:14:29 GMT</pubDate>
    <dc:creator>LindsayRaabe</dc:creator>
    <dc:date>2016-07-18T03:14:29Z</dc:date>
    <item>
      <title>Including the date in an Output Feature Class filename using Model Builder</title>
      <link>https://community.esri.com/t5/modelbuilder-questions/including-the-date-in-an-output-feature-class/m-p/780137#M2935</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So simply put, I'm trying to use the Feature Class to Feature Class tool and as a part of the output feature class (going into a GDB), I want to include the current date. I've tried using the following text in the Output Feature Class field but alas the tool crashes;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Output_%Date%&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any suggestions on where I'm going wrong? The aim is to build up a list of feature classes that can be compared using a different model later on to track changes between versions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="212114" alt="Output Date in Name.jpg" class="image-1 jive-image" src="/legacyfs/online/212114_Output Date in Name.jpg" style="width: 620px; height: 461px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #e23d39;"&gt;&lt;EM style="text-decoration: underline;"&gt;&lt;STRONG&gt;UPDATE&lt;/STRONG&gt;&lt;/EM&gt;&lt;/SPAN&gt;: &lt;SPAN style="color: #3d3d3d; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;OK, So I figured out that I needed to create the Date Variable to start with which I have done. My next issue is that it won't work because the date contains 2 slashes ( 18/07/2016 ). What would be the best way of getting this converted to a text element that can replace the / with an _ and maybe even reorder the numbers in reverse (e.g. Output_2016_07_18).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;&lt;IMG __jive_id="212112" alt="Output Date in Name with Variable.jpg" class="image-2 jive-image" src="/legacyfs/online/212112_Output Date in Name with Variable.jpg" style="width: 620px; height: 401px;" /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Jul 2016 03:14:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/modelbuilder-questions/including-the-date-in-an-output-feature-class/m-p/780137#M2935</guid>
      <dc:creator>LindsayRaabe</dc:creator>
      <dc:date>2016-07-18T03:14:29Z</dc:date>
    </item>
    <item>
      <title>Re: Including the date in an Output Feature Class filename using Model Builder</title>
      <link>https://community.esri.com/t5/modelbuilder-questions/including-the-date-in-an-output-feature-class/m-p/780138#M2936</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;modelbuilder and dates... my 2 most hated topics...&lt;/P&gt;&lt;P&gt;An example using python&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&amp;gt;&amp;gt;&amp;gt; nw = datetime.datetime.now().date()
&amp;gt;&amp;gt;&amp;gt; ns = str(nw).replace('-','_')
&amp;gt;&amp;gt;&amp;gt; ns
'2016_07_18'
&amp;gt;&amp;gt;&amp;gt;&lt;/PRE&gt;&lt;P&gt;but I have my system setup to use international standards, I just get the date if it is in a date-time output, convert it to a string and replace whatever separator after.&amp;nbsp; The above might give you some ideas.&amp;nbsp; You can set your date time settings at the windows level as covered in the help topic on dates&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 08:48:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/modelbuilder-questions/including-the-date-in-an-output-feature-class/m-p/780138#M2936</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2021-12-12T08:48:31Z</dc:date>
    </item>
  </channel>
</rss>

