-d parameter not working

Started by ron1521, October 05, 2024, 03:49:01 AM

Previous topic - Next topic

ron1521

I am using
exiftool.exe -d "%Y-%M-%dT%H:%M:%S%2f" -n -c "%.12f"  -G 20240929_133524.jpg

but the dates are displayed as

Create Date                     : 2024:09:29 13:35:24.16

I want 2024-09-29T13:34:24.16

It works ok without the -n option, but I need the lat/long etc in decimal format. Do these tags interact somehow?

Using exiftool-12.96_64 under Windows 10
Any ideas?
Thanks

StarGeek

Yes, the -n (--printConv) option by definition disables all conversions that exiftool does to make data more human readable, which directly contradicts the PrintConv done with the -d (-dateFormat) option.

If you are listing GPS data directly, then you can add a # to the end of any tag name that you want the raw output for
C:\>exiftool.exe -G -s -d "%Y-%M-%dT%H:%M:%S%2f" -CreateDate -GpsLatitude# -GPSLongitude# y:\!temp\Test4.jpg
[EXIF]          CreateDate                      : 2024-00-05T12:00:00.00
[Composite]     GPSLatitude                     : 40.6892
[Composite]     GPSLongitude                    : -74.0445

The other option is the -c (-coordFormat) option, which you are using, but is disabled by your use of the -n option. And since it appears you want to include signed data instead of N/S/E/W, you need to add a dash to the format code. Or a plus sign + if you want the positive numbers to include a leading +

Example:
C:\>exiftool.exe -G -s -d "%Y-%M-%dT%H:%M:%S%2f" -c "%-.12f" -CreateDate -GpsLatitude -GPSLongitude y:\!temp\Test4.jpg
[EXIF]          CreateDate                      : 2024-00-05T12:00:00.00
[Composite]     GPSLatitude                     : 40.689200000000
[Composite]     GPSLongitude                    : -74.044500000000

C:\>exiftool.exe -G -s -d "%Y-%M-%dT%H:%M:%S%2f" -c "%+.12f" -CreateDate -GpsLatitude -GPSLongitude y:\!temp\Test4.jpg
[EXIF]          CreateDate                      : 2024-00-05T12:00:00.00
[Composite]     GPSLatitude                     : +40.689200000000
[Composite]     GPSLongitude                    : -74.044500000000
"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

ron1521