# Exif: replacing the Date Time Informations with Date Time Original content



## danibo (Nov 26, 2014)

Hallo
I have many scans of old pictures with the wrong data in the field Date Time.
How can I replace this content with the information from the field Date Time Orginal.
I found a Plugin Capture Time to Exif but I do not understand how to configure it...
Does anybody has experience with it?
Thanks
danibo


----------



## LouieSherwin (Nov 26, 2014)

Hi danibo and welcome to the forum.

Select a photo or set of photos in the Grid and this plugin will take a starting date as filled out in the first set of input boxes and update all the date fields in each of the selected photos. Optionally you can check the "Increment Timestamp" checkbox and it will add 1 second to the time of each selected photo so that you can use sort by capture time. 

Additionally you can use the Arguments box to update the selected photos with additional EXIF data that you may wish to record into the scan files. The values given are just examples and you will need to fill in the correct values for your equipment that was used to take the photo. If you don't wish to make any updates to other EXIF fields then just leave this box blank. 

You can save multiple presets, each one having a different set of arguments. 

Read the Recommended use page and the FAQ page for further info.

-louie


----------



## danibo (Nov 27, 2014)

Louis 
Thanks for your explanations.
I just want to replace the CaptureDate infomation with the informationd from the field DataTimeOriginal because if you upload the pictures with LR Piwigo Plugin to the Database on a server. Piwigo reads the CaptureDate first. (If you synchronise Piwigo later it reads the right DataTimeOriginal out....

I was trying with the following commands to overwright the field CaptureDat but had no success.

"-CreateDate<DateTimeOriginal" 
"-ModifyDate<DateTimeOrignal" 
"-FileModifyDate<DateTimeOriginal"

But with this command it creats just a new timestamp Date Digitized (see screenshot)

I will attache a sample picture

Thanks
Daniel


----------



## LouieSherwin (Nov 27, 2014)

Hi Daniel,

That is not the correct syntax for replacing DateTimeOriginal . To replace DateTimeOriginal you need a right angle bracket (greater than) between the two tags. The data flows in the direction of the point. For example to update DateTimeOriginal with CreateDate you would use the following argument

"-CreateDate>DateTimeOriginal"

Also it is not clear what date/time fields are actually in your image. There are several possible locations for all the dates and Lightroom and exiftool use some rules to try to pickup a valid date. For example there are EXIF dates, XMP dates and FILE dates.  If you haven't already I would recommend installing the command line exiftool on your system so that you can look inside all of the metadata to see what is actually there and which fields you want to use.

Here is a useful command to examine all of the time fields in a file and show their block and tag names. You can combine these names later to pick a specific field to use a source or destination in a subsequent update command. The first column is the metadata block and the second is the tag. You combine them by as -block:tag. They are not case sensitive even though they are displayed with capital letters. 

exiftool -G -s -time:all IMG_8131.JPG [File]          FileModifyDate                  : 2013:11:08 08:05:24-08:00
[File]          FileAccessDate                  : 2014:11:13 05:49:26-08:00
[File]          FileInodeChangeDate             : 2014:10:06 09:33:04-07:00
[EXIF]          ModifyDate                      : 2013:10:26 13:15:25
[EXIF]          DateTimeOriginal                : 2013:10:26 13:15:25
[EXIF]          CreateDate                      : 2013:10:26 13:15:25
[EXIF]          SubSecTime                      : 00
[EXIF]          SubSecTimeOriginal              : 00
[EXIF]          SubSecTimeDigitized             : 00
[XMP]           DateTimeDigitized               : 2013:10:26 13:15:25.00-07:00
[XMP]           MetadataDate                    : 2013:10:26 18:51:42-07:00
[Composite]     SubSecCreateDate                : 2013:10:26 13:15:25.00
[Composite]     SubSecDateTimeOriginal          : 2013:10:26 13:15:25.00
[Composite]     SubSecModifyDate                : 2013:10:26 13:15:25.00

exiftool -exif:datetimeoriginal<-xmp:datetimedigitized IMG_8131.JPG

Note that the "Composite" group is something created by exiftool as a convenience. You can use it as a source but cannot write to it.

Once you figure out what dates are recored in your image files then you can use the plugin to update image metadata. Remember that you have to tell Lightroom to reread all the modified files because exiftool only writes out to disk.

-louie


----------



## danibo (Dec 1, 2014)

Louie
thank you very much for your clear and detailed answer.
that helps a lot
danibo


----------

