Inserting Current Date into Filename via Modelbuilder

16105
16
02-04-2011 05:46 AM
JeffPickles
New Contributor III
Is there a way to programmatically export a shapefile or feature class from Modelbuilder that has the current date in its filename?
16 Replies
ShariForbes
New Contributor III

Helped me too! Never too late. 

0 Kudos
MichelleWalker
New Contributor II

thanks so much - this worked great and really helped me

0 Kudos
curtvprice
MVP Esteemed Contributor
0 Kudos
WilliamJackson4
New Contributor II

Odd, the example doesn't seem to work for me. I'm running 10.3.1. If I run in a python script it works fine but not so much in Model Builder where the variable is assigned a "1". Any suggestions?

0 Kudos
MichaelClementz
New Contributor II

William, I was having the same issue but then I connected the output date (green bubble) as a precondition variable to the tools (yellow bubble) that I ran and it worked for me!

LindsayRaabe_FPCWA
Occasional Contributor II

I seem to be having similar issues. I was getting the "1" output but now I get the date but also keep getting errors about incorrect naming. Can anyone tell me what name is wrong? The original demo tool provided further up has the same issue!

The GIS guy (not the IT guy)
0 Kudos
curtvprice
MVP Esteemed Contributor