Formatting date time for output to a csv file

Started by d50034-furious, November 26, 2024, 10:19:52 AM

Previous topic - Next topic

d50034-furious

I've got to the stage where I'm able to output to a csv file to eventually put into an Access database. However, I'm having difficulties with formatting a date. I'm using an args file, but it's not obvious to me where and how the -d '%d-%m-%Y %H:%M:%S' format goes. I've tried running the exiftool function as

exiftool -d '%d-%m-%Y %H:%M:%S' -DateTimeOriginal *.jpg
This gives the date without time and says one file couldn't be processed, yet everything I've seen says to put single quotes around the format as it has the space.
Here are some of the lines from my args file
-EXIF:Artist
-EXIF:copyright
-d '%d-%m-%Y %H:%M:%S'
-EXIF:DateTimeOriginal
-XMP:Description
-EXIF:ExposureTime
What am I doing wrong?
Malcolm

StarGeek

This is FAQ #29, "My options don't work in a -@ ARGFILE".

You would use
-d
%d-%m-%Y %H:%M:%S

Separate lines, no quotes, no trailing spaces.
"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

d50034-furious

I tried that and it still threw a wobbly - then I noticed a space after -DateTimeOriginal, removed that and now it works. Something to be aware of. Now to seeing about importing into Access!
Is there a thanks button on this forum? If not then 'Thanks!'
Malcolm