AnsweredAssumed Answered

Add seconds to a datetime in arcpy field calculator

Question asked by ian.irmischer on Dec 16, 2015
Latest reply on Dec 17, 2015 by ian.irmischer

Hi, I have a date field called date with date times in format 4/1/2016 6:40:00 AM

 

I have a second field called times that is a double with numbers of seconds.

 

I would like to use arcpy.CalculateField_management to add the seconds to the time in a new date field called futuretime.

 

I can do this in the field calculator in VB using:

 

DateAdd ( "s", [times], [date] )

 

But I am trying to use a script to run through a bunch of files in a for loop.

 

I started with

for files in allFC:

     arcpy.CalculateField_management(files, "futuretime",?????, "PYTHON_9.3",????)

but I can not figure out the code to fill into the ?????s

 

Thanks for any help,

Ian

Outcomes