Can't get sub seconds to work

Started by trainman, March 27, 2023, 04:59:46 AM

Previous topic - Next topic

trainman

I'm having trouble renaming my files.  I take a lot of Burst photos, and want to use the fractional seconds in the filenames for sorting purposes.

When I run the command
exiftool -d %Y-%m-%d_%H%M-%S-%-3f.%%e "-testname<CreateDate" .
It outputs the fractional seconds as 000, but when I run
exiftool -subsecdatetimeoriginal img12345.heic
It correctly shows the fractional seconds as 462.

Normally I use GeoSetter for renaming my files, but it does not support extracting the EXIF data from HEIC files yet.

Any Idea why the %-3f tag doesnt retrieve the fractional seconds, and what I can do to fix it please?

greybeard

Maybe use subsecdatetimeoriginal instead of CreateDate if that gives the result you need

StarGeek

Greybeard has the (almost?) correct answer.  Though if you want to use the subseconds corrisponding to CreateDate, you would use SubSecCreateDate (see the Composite tags page).

CreateDate only includes the the day and time down to the seconds.  Subseconds are held in a completely different tag, SubSecTimeDigitized, so they won't show up when you use just CreateDate.  And timezone is held yet a different tag, OffsetTimeDigitized.

Example:
C:\Programs\My_Stuff>exiftool -time:all --file:all -G1 -a -s y:\!temp\Test4.jpg
[ExifIFD]       CreateDate                      : 2023:03:27 12:00:00
[ExifIFD]       OffsetTimeDigitized             : -07:00
[ExifIFD]       SubSecTimeDigitized             : 55
[Composite]     SubSecCreateDate                : 2023:03:27 12:00:00.55-07:00
"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

greybeard

Quote from: StarGeek on March 27, 2023, 11:35:13 AMGreybeard has the (almost?) correct answer.

Thanks for adding the much more complete answer