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;
Output_%Date%
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.
UPDATE: 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).
modelbuilder and dates... my 2 most hated topics...
An example using python
>>> nw = datetime.datetime.now().date() >>> ns = str(nw).replace('-','_') >>> ns '2016_07_18' >>>
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. The above might give you some ideas. You can set your date time settings at the windows level as covered in the help topic on dates