ExifTool Forum

ExifTool => Newbies => Topic started by: jvp on May 04, 2016, 06:45:44 PM

Title: How to check and correct CreateDate?
Post by: jvp on May 04, 2016, 06:45:44 PM
Hi,

In my photo collection, I have many pictures with an incomplete CreateDate tag that is not understood by google photos. For example:
exiftool -s IMAGE0018.JPG yields following lines (and google photos uses ModifyDate instead of CreateDate...)

ModifyDate                      : 2010:03:02 22:58:35
DateTimeOriginal                : 2003:03:   00:00:00
CreateDate                      : 2003:03:   00:00:00


Most pictures have a correct CreateDate tag which I do not want to modify. Any ideas to detect the incomplete CreateDate tags and modify them to e.g. the first day of the month?

When I copy CreateDate to allDates, with exiftool "-alldates<createdate" IMAGE0018.JPG day 0 is filled in:

ModifyDate                      : 2003:03:00 00:00:00
DateTimeOriginal                : 2003:03:00 00:00:00
CreateDate                      : 2003:03:00 00:00:00

But google photos does not like day 0, so I would need the result:

ModifyDate                      : 2003:03:01 00:00:00
DateTimeOriginal                : 2003:03:01 00:00:00
CreateDate                      : 2003:03:01 00:00:00


Can you help me with a command line to do the detection and correction of incomplete CreateDate tags?

Thanks!

jvp.
Title: Re: How to check and correct CreateDate?
Post by: Phil Harvey on May 05, 2016, 07:24:23 AM
Sure,  try this:

exiftool "-DateTimeOriginal<${DateTimeOriginal;s/:(  |00) /:01 / or $_=undef}" "-CreateDate <${CreateDate;s/:(  |00) /:01 / or $_=undef}" FILE

This will fix the day for DateTimeOriginal and CreateDate if it is blank or 00, and won't modify files that are already OK.

- Phil
Title: Re: How to check and correct CreateDate?
Post by: jvp on May 06, 2016, 03:53:04 AM
Thanks Phil, this seems to do the trick!

You made an excellent piece of free software with exiftool, which I already used indirectly through GPicSync to geotag pictures.

But now I experienced how you also take the time to answer newbie questions and help people forward. Thanks again!

jvp.
Title: Re: How to check and correct CreateDate?
Post by: chess on August 20, 2018, 12:50:15 PM
Hi all, I am quite new to exiftool and what to do the same as described in the post, but I get an error message saying: Warning: No writable tags set from ./Film

I used the following command in  Windows:
exiftool "-DateTimeOriginal<${DateTimeOriginal;s/:(  |00) /:01 / or $_=undef}" "-CreateDate<${CreateDate;s/:(  |00) /:01 / or $_=undef}" .\Film_309_2001-02_Carlotta_008.jpg
Title: Re: How to check and correct CreateDate?
Post by: Phil Harvey on August 20, 2018, 12:51:45 PM
Can you show the output of this command for your file?:

exiftool -a -G1 -s -time:all FILE

- Phil