Hi Phil / Team,
BACKGROUNDAs you'll know (or at least AFAIK) by default time values are formatted depending on their value:
- IF duration < 1 minute: "00.00 seconds"
- IF duration > 1 minute: "H:MM:SS"
QUERYI would like to format all times as "
HH:MM:SS" and looked into 1-2 ways of doing this, however in my case they don't seem to work and am getting a bit stuck, so wonder if you can help me out please! So far, I've considered...
- ❌ Use -n to disable processing (https://exiftool.org/forum/index.php?topic=5519.0): I am also using -d "%d/%m/%Y %H:%M:%S" and if I include -n to the command it blocks -d from working, so I can't use this option [see: -d -n conflict]
- ❌ Global change to time formatting: I don't have the link, but remember reading on another post that this was hard-ruled-out a while ago as many people/scripts rely on the current rules (which is understandable)
❔
Are there any other ways of setting/controlling this please?
Appendix: -d -n conflict Now, overall I have to say I am big fan of EXIFtool and I do appreciate all the work over the years that has been put into it, so I will let you off for this ;) but that said, I'll confess that I was screaming and cursing your name rather loudly earlier as had spent well over an hour banging my head against a brick wall, trying to figure out why EXIFtool wasn't processing my -d parameter...
EXIFTool.exe -c "%.6f" -d "%d/%m/%Y %H:%M:%S" -n %*I assumed it was something to do with the parent/wrapping script, or maybe something to do with % being expanded before it reached EXIFtool -- I probably tried 20+ combinations of ", "", %, %%, escaping with ^, delayedexpansion on/off, etc but just could not figure it out!...
- -d is clearly defined (https://exiftool.org/exiftool_pod.html#d-FMT--dateFormat) for formatting datetime values
- -n (https://exiftool.org/exiftool_pod.html#n---printConv) is advised when you want to turn of 'friendly' formatting for time values (dates aren't mentioned in any of the examples)
- I just can't figure out what I'm doing wrong and why this isn't working
... Until I happen to read a footnote in one of the FAQs saying "
-n option may be used to disable all of the date/time reformatting"...
HUH!? ... OK, well
that explains why EXIFtool wasn't processing my -d argument! >:( (At least this means my coding isn't quite as bad as I thought! ;D ::) )
[With genuine tone]
Please can I suggest adding a note to the -n / -d sections of the manual, explaining that -n will override/negate -d if it is included... While I appreciate it may seem somewhat niche, it did genuinely eat up a big chuck of my time just now (plus, hopefully wouldn't hurt to make this clearer and avoid anyone else running foul of the same combination).