ExifTool Forum

ExifTool => Newbies => Topic started by: elcinnamonb on February 27, 2015, 10:26:04 AM

Title: Changing only Year using AllDates Command
Post by: elcinnamonb on February 27, 2015, 10:26:04 AM
I'm trying to change the year only using the command AllDates.

This is what I think it would look like, but it's not working

-AllDates-='-8:0:0'

I want to change an image, say, from 2011-07-21 at 00-49-36 to 2003-07-21 at 00-49-36

What's the right command?
Otherwise, what's a good command to get this done? Thank you very much.
Title: Re: Changing only Year using AllDates Command
Post by: Phil Harvey on February 27, 2015, 10:33:52 AM
To subract 8 years, use -alldates-="8:0:0 0"

(Here I used double quotes so it will also work in Windows.  The single quotes would only work in Mac/Linux.)

Read here (https://exiftool.org/Shift.html) for all the details.

- Phil
Title: Re: Changing only Year using AllDates Command
Post by: abalter on March 05, 2015, 05:46:22 PM
I tried it, and it changed all the times to 00:00:00. I also tried just using "YYYY:MM:DD" and got an error.


C:\Users\abalter\Documents\Image-ExifTool-9.88\testimages>exiftool -FileCreateDate="2015:03:05" -FileModifyDate="2015:03:05" *
Warning: Invalid date/time (use YYYY:mm:dd HH:MM:SS[.ss][+/-HH:MM|Z]) in File:FileCreateDate (PrintConvInv)
Warning: Invalid date/time (use YYYY:mm:dd HH:MM:SS[.ss][+/-HH:MM|Z]) in File:FileModifyDate (PrintConvInv)
Nothing to do.
Title: Re: Changing only Year using AllDates Command
Post by: Phil Harvey on March 05, 2015, 07:47:52 PM
I'm confused.  You say that the command I posted changed the times to 00:00:00?  I don't see how that is possible.

Also, in your last post you are now trying to write date/time tags, but you have only specified the date.

- Phil
Title: Re: Changing only Year using AllDates Command
Post by: abalter on March 05, 2015, 11:14:00 PM
So here is my experiment:
1) Explicitly set YYYY:MM:DD HH:MM:SS
2) Display to confirm
3) Try to set just YYYY:MM:DD using ="2015:03:05 0"
4) Display to confirm


C:\Users\abalter\Documents\Image-ExifTool-9.88\testimages>exiftool -FileCreateDate="2013:04:05 06:07:08" -FileModifyDate="2013:04:05 06:07:08" IMG_8220.JPG
    1 image files updated

C:\Users\abalter\Documents\Image-ExifTool-9.88\testimages>exiftool -system:time:all IMG_8220.JPG
File Modification Date/Time     : 2013:04:05 06:07:08-07:00
File Access Date/Time           : 2013:04:05 06:07:08-07:00
File Creation Date/Time         : 2013:04:05 06:07:08-07:00

C:\Users\abalter\Documents\Image-ExifTool-9.88\testimages>exiftool -FileCreateDate="2015:03:05 0" -FileModifyDate="2015:03:05 0" IMG_8220.JPG
    1 image files updated

C:\Users\abalter\Documents\Image-ExifTool-9.88\testimages>exiftool -system:time:all IMG_8220.JPG
File Modification Date/Time     : 2015:03:05 00:00:00-08:00
File Access Date/Time           : 2015:03:05 00:00:00-08:00
File Creation Date/Time         : 2015:03:05 00:00:00-08:00


Sorry to keep bugging you!  I just really want to know how to do this.

Thanks, Ari
Title: Re: Changing only Year using AllDates Command
Post by: Hayo Baan on March 06, 2015, 03:51:30 AM
The commands you use and the output they generated is exactly what I would expect. What would you want to see happen instead?
Title: Re: Changing only Year using AllDates Command
Post by: abalter on March 06, 2015, 03:42:29 PM
I'm trying to keep the HH:MM:SS of the original file. Parallel discussion going on here

https://exiftool.org/forum/index.php?board=12.0

Maybe you have some insight.
Title: Re: Changing only Year using AllDates Command
Post by: Phil Harvey on March 07, 2015, 07:35:53 AM
Hi Ari,

To keep the original time, you could do this:

exiftool "-FileCreateDate<2015:03:05 ${filecreatedate;s/.* //}" ...

Search for "advanced formatting" in the application documentation (https://exiftool.org/exiftool_pod.html) for more information.

- Phil
Title: Re: Changing only Year using AllDates Command
Post by: abalter on March 24, 2015, 12:06:26 AM
Hi Phil,

That did it!

Thanks,

Ariel