Posted on 2010-02-15 05:47:54.634783-08 by dschless
EXIF Partial Dates
When a file's EXIF Date/Time Original contains a partial date, e.g. 2009:01 - year and month but no day, there is an inconsistency when extracting the date field:

exiftool -DateTimeOriginal file.jpg
Date/Time Original : 2005:01: 00:00:00

exiftool -exif:DateTimeOriginal -d "y=%Y m=%m d=%d" file.jpg
Date/Time Original : y=2004 m=12 d=31

I understand why it is happening, but the formatted date has the wrong value. Also if %d is returning the last day of the previous month instead of blank or nothing, is there any way to list files that are missing the day value using an -IF EXPR?

Thanks,
Dan Schless
Direct Responses: 12401 | Write a response
Perl Weekly newsletter
A free weekly newsletter for people who are busy to read all the blogs. click here to check it out.