I need to add seconds in an numeric column(TS_sec) to a datetime column(TS) in ArcGIS field calculator. I am using Vbscript. But i am getting following error: ERROR 999999: Error executing function. Expected end of statement Failed to execute (Calculate Field (16))

I am using following VBscript code:

Code block
dim TS_seconds as date
if [TS_sec] = Null then
TS_seconds=DateAdd ("s", [TS_sec] , [TS] )
end if
Expression ETA_TS=

1 Answer 1


When using VBScript, do not specify the variable type. Instead of

dim TS_seconds as date

simply use

dim TS_seconds

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.