Model Builder Date Input to Field Calc Value

590
4
Jump to solution
04-11-2021 05:42 PM
AwesomeEvan
Occasional Contributor

In my model builder process, I simply want to populate a date field with a date value that is an input parameter.

It seems that the date format of input doesn't jive with the date field. I've read a few posts and nothing has worked for me. Please help with clear and complete instructions!

AwesomeEvan_0-1618187881173.png

 

0 Kudos
1 Solution

Accepted Solutions
PaoloPensalfini
New Contributor III

HI! I tried a simple tool and it worked fine!
I only added a precondition (2) and in the Field calculator's Expression field I used the variable %Date% inside two superscripts (like this '%Date%' (4)) and I used Python_9.3 as "Expression Type" (5).

PaoloPensalfini_0-1618235715729.png

 

View solution in original post

4 Replies
DavinWalker2
Esri Contributor

Hi,

Without seeing what you have done it's hard to give a definitive answer. Can you provide an error message?

Is your inline variable entered correctly?

Inline Variable.jpg

PaoloPensalfini
New Contributor III

HI! I tried a simple tool and it worked fine!
I only added a precondition (2) and in the Field calculator's Expression field I used the variable %Date% inside two superscripts (like this '%Date%' (4)) and I used Python_9.3 as "Expression Type" (5).

PaoloPensalfini_0-1618235715729.png

 

AwesomeEvan
Occasional Contributor

ugh that works just fine... I was using VB "%Date%" which didn't work for me...

Thanks.

0 Kudos
PaoloPensalfini
New Contributor III

I'm not sure, but I think VB is no more supported by ESRI.

I'm happy it worked fine for you, too!

0 Kudos