ExifTool Forum

ExifTool => Newbies => Topic started by: GG on February 07, 2023, 04:44:07 AM

Title: Interpret date comment despite - and : or replace these character
Post by: GG on February 07, 2023, 04:44:07 AM
Hey y'all,

Love Exiftool been using it for some time.

I've encountered insta360 video files where the creation dates are all 000000 but there is a ItemList/Comment tag with the creation date as string: 2022-01-09 15:08:23 +0000 .

Can I get exiftool to interpret this and output it using the -d "%%Y.%%m.%%d_%%H.%%M.%%S" command?
Title: Re: Interpret date comment despite - and : or replace these character
Post by: StarGeek on February 07, 2023, 11:34:30 AM
No.  The -d (-dateFormat) option (https://exiftool.org/exiftool_pod.html#d-FMT--dateFormat) can only affect date/time tags.

If you were looking to copy the date in the Comment tag and the only numbers in it were the time stamp, then you could copy the Comment directly into a date/time tag.  See FAQ #5 (https://exiftool.org/faq.html#Q5), paragraph starting "Having said this"
exiftool "-CreationDate<Comment" /path/to/files/

There are other things that can be done to change the display of the Comment tag, but that would depend upon what the actual output you are trying for is.
Title: Re: Interpret date comment despite - and : or replace these character
Post by: GG on February 09, 2023, 12:09:06 PM
Thank you very much for your prompt reply, that worked perfectly !!

I used what you suggested: exiftool "-CreationDate<Comment"
Then I used: exiftool.exe "-FileName<${CreationDate}_$filename" -d "%%Y.%%m.%%d_%%H.%%M.%%S" to also lock it into the file name.