DateTIme Formats always formatted as YYYY:MM:DD HH:MM:SS?

Started by Mac2, November 10, 2017, 08:17:27 AM

Previous topic - Next topic

Mac2

I thought ExifTool would always format EXIF/XMP timestamps (Original/Created/Modified) as YYYY:MM:DD HH:MM:SS (and maybe the optional time-zone offset).

I just noticed for a file created with On1 Photo RAW, -alldates returns:

[ExifIFD]       Date/Time Original              : 2017:08:17 9:33:26
[ExifIFD]       Modify Date                     : 2017:08:17 9:33:26


Note the missing leading 0 in front of the hour. Is this correctly formatted?
I've searched my database with thousands of tag values imported from ExifTool and it always shows single digit hours with a leading 0.


Phil Harvey

By default, exiftool doesn't reformat EXIF date/time values.  But you can do it with the -d option:

exiftool -d "%Y:%m:%d %H:%M:%S" ...

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

Mac2


StarGeek

I've encountered a few files over the years that had incorrectly written EXIF timestamps.  I've seen them written as MM/DD/YYYY and MM-DD-YYYY, though I don't recall too many with errors in the time part.
"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype

Mac2

It's rare. I searched my database and in over 60,000 records I have only two timestamps without a leading 0 for the hour. I will enhance my XML parser to deal with that so I get clean data.