Hello everyone,
How to add a date variable in an expression?
I am working with a FGDB in ArcGIS 10.2
I have two variables in Model Builder script:
- DateFrom populated with 5/1/2017 1:03:07 PM
- DateTo populated with 5/31/2017 1:03:23 PM
an the expression I tried with MakeFeature:
CRTDATE >= %DateFrom% and \nCRTDATE <= %DateTo% => fails
CRTDATE >= #%DateFrom%# and \nCRTDATE <= #%DateTo%# => fails
ERROR 000230: Failed selecting with CRTDATE >= #5/1/2017 1:03:07 PM# and \nCRTDATE <= #5/31/2017 1:03:23 PM#
An invalid SQL statement was used.
Any suggestion?