Format timestamp variable with sub seconds

Started by hluxem, July 22, 2023, 01:58:17 AM

Previous topic - Next topic

hluxem

The help states that a time variable can be formatted like below. Is there a way to include the sub seconds as well? I couldn't find anything in the help if that is supported.


{File.MD.datecreated|format:YYYY:MM:DD hh:mm:ss}

Thanks,

Heiner

Mario

If a camera records sub seconds, it is contained in separate tags, e.g. {File.MD.Exif::Main\37521\SubSecTimeOriginal\0} or {File.MD.Exif::Main\37521\SubSecTimeDigitized\0}. If and which of these tags exist depends on your specific camera model. Check in the Metadata Panel using the Browser layout and then use the "Copy as Variable" from the context menu.

Use something like

{File.MD.XMP::photoshop\DateCreated\DateCreated\0}{File.MD.Exif::Main\37521\SubSecTimeOriginal\0|prefix:.}

to ensure that the . is only emitted when there is a sub-second value available.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook