I wish to georeference several photos to a track created using a Garmin Oregon 450t, but the time recorded in the photos and the time recorded in the .GPX are not the same.

The format for the date field is day, month, year, hour, minute, second e.g. 27/05/2014 7:20:05 PM. My (limited) attempts with the Field Calculator so far have yielded nothing.

Is there a simple method to add or subtract something like one hour, five minutes and eighteen seconds to all records in the date field?

  • is the date field of type text or of type date? Adding/subtracting date and time isn't as straightforward as you might think but it should be possible. May 28, 2014 at 21:50
  • The type is Date.
    – Adam Thom
    May 28, 2014 at 21:53

1 Answer 1


Use the DateAdd (or here) function. It looks like hours, minutes and seconds have to be added separately (3 calcs). I recommend adding a new date field and field calculating there... to preserve the original.

enter image description here

  • The ESRI date field is a DateTime object depending on the data storage help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//…. DateDiff and DateAdd sees the value as long date format, which is miliseconds from an arbitrary point (1907 I think) and converts the time interval into miliseconds before doing the calculation. May 28, 2014 at 22:43
  • 1
    My comment tried to bring up what I thought was the issue behind this question. However, upon further review I no longer know what was going on there. Based on the testing I just did, DateDiff should have worked. @adamthom You could do this with one Field Calculation as suggested if you just convert your h:m:s value to seconds first and then use DateAdd ("s", #seconds, [datefield]) per Michael's solution.
    – Chris W
    May 29, 2014 at 0:54
  • I had a feeling this would be the case. Ideally a python script would be written and used on a .gpx file and automatically adjust the time, but the DateAdd function works and is not too bad.
    – Adam Thom
    May 29, 2014 at 17:46

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.