Calculating the date in YYYYMMDD format as the first step in my model for all of my output Feature Classes to have that at the end of their name. I use the Calculate Value tool to get the Variant YYYYMMDD and I am trying to pass it to multiple output FCs throughout the model.
This shows how I calculate the %DATE% variable-
I set the Calculate Value took as the Precondition for the next step, which is here- I try to add the variable sub to an output FC name (Parcels_%DATE%), it tells me that it Contains Invalid Characters-
I feel like I have got to be missing something pretty obvious, either that or completely misunderstanding the use of the inline variable subs. Any help/ideas are appreciated!
***I do understand that I can skip the Calculate Value and just use the built-in variable sub %t%, but I prefer the date format I've chosen using the Calculate Value tool.
Your script logic looks sound but its how you are reference the inline variable that is the issue.
Your calculate value tool - don't name its output with 1) a database reserved word and 2) with %% around it. Call it something like myDate.
If you had renamed the output to %bob% then you would need to reference it as %%bob%%.