ExifTool Forum

ExifTool => Newbies => Topic started by: Paul Barrett on November 27, 2016, 03:57:42 AM

Title: A few date questions
Post by: Paul Barrett on November 27, 2016, 03:57:42 AM
I am using Date/Time Original to batch update the following fields on thousands of files:

Create Date
I need to append a Z to the date I am getting from Date/Time Original to denote UTC time format.  What would the additional syntax be after CreateDate<Date/Original so that I end up with YYYY:MM:DD HH:MM:SSZ

File Creation Date/Time
Similar to last question but this time I need to append +00:00:00 so that I get YYYY:MM:DD HH:MM:SS+00:00:00

Date Created
Time Created

I need to separate and extract the date and time elements of Date/Time Original for these two fields.  What would the syntax be for that please?

OK I experimented and found the answer to that one.  No special syntax required.  You just say -TimeCreated<DateTimeOriginal and ExifTool does the work for you.  How cool is that?!! :) :) :)


Thanks in advance for your help

Regards

- Paul

Title: Re: A few date questions
Post by: Phil Harvey on November 27, 2016, 04:46:46 PM
Hi Paul,

Nice to see that you tried out some ideas yourself.  Yes, You can write a date/time value to DateCreated and TimeCreated and ExifTool will figure it out. 

To append Z: exiftool "-createdate<${datetimeoriginal}Z" DIR

And you use a similar method to append "+00:00:00".

- Phil
Title: Re: A few date questions
Post by: Paul Barrett on November 28, 2016, 01:08:33 PM
Hi Phil

Thanks for that. I am writing a blog for users of Daminion and Synology Photo Station apps and I am pointing people at ExifTool for metadata management and I am giving example of syntax for newbies.  I am also encouraging them to join the forum as it is the most responsive forum I have ever used.  OK, sucking up is done.

I am checking out all my syntax examples before I publish and all are working well except one that is returning an ExifTool warning:

"Warning: Sorry, datetimecreated is not writable"

This is odd, because before I ran the command I deleted the existing tags, and verified that the field had been removed.

I ran the command and got the warning message but when I viewed the metadata, the correct data had been written:

---- Composite ----
Date/Time Created                2016:11:11 15:43:01+00:00


So why did I get the warning please?  I am running ver 10.36 at the CLI

Regards

Paul

Title: Re: A few date questions
Post by: horvjan on November 28, 2016, 02:30:30 PM
Paul,

I plan to switch to synology d216-play. May I have your blog? I would like to read yout posts.

Thank in advance:

horvjan
Title: Re: A few date questions
Post by: Paul Barrett on November 28, 2016, 06:54:58 PM
Do the forum rules allow me to 'plug' my own site?  I will post the link and if a moderator wants to remove it. so be it.  :)

Horvan

I am still finessing the content and getting feedback from 'editors' but it is accessible.  Please just bear in mind that it may still change.  Also it is very much aimed at people who are using Daminion AND Synology Photo Station together and are NOT that technically minded.  That said, much of the Synology related content is generic so please see what you think.  I am not a professional writer so forgive my ramblings!  And feel free to post comments and questions to help me improve it.

Oh, and finally, there is one unpublished article still in draft that I will release soon.  It's the one that describes my use of ExifTool to improve Photo Station image date sorting.

This is the link:

http://barrettnas2.synology.me/wordpress/ (http://barrettnas2.synology.me/wordpress/)

I hope you find it useful.  It's my first attempt at anything like this so please be gentle!

- Paul
Title: Re: A few date questions
Post by: Phil Harvey on November 28, 2016, 07:02:38 PM
Hi Paul,

Sure you can plug your own site here.  We don't have any rules here other than "no spam bots".

Quote from: Paul Barrett on November 28, 2016, 01:08:33 PM
"Warning: Sorry, datetimecreated is not writable"

Yes.  Composite:DateTimeCreated is not writable.  You must write the associated tags (IPTC:DateCreated and IPTC:TimeCreated).  See the Composite tags documentation (https://exiftool.org/TagNames/Composite.html) for details like this.

- Phil
Title: Re: A few date questions
Post by: Paul Barrett on November 29, 2016, 02:31:49 AM
OK, thanks Phil.

I'm still a little confused.  If the tag isn't writable and the existing tag had been removed from the metadata, how could it have appeared again?

- Paul

Title: Re: A few date questions
Post by: Phil Harvey on November 29, 2016, 09:21:37 AM
Hi Paul,

DateCreated and TimeCreated must exist if Composite DateTimeCreated is appearing.  If DateTimeCreated didn't exist before, then you must be writing either or both of DateCreated and TimeCreated.

If you are still confused, post your command and I'll tell you what is happening.

- Phil
Title: Re: A few date questions
Post by: Paul Barrett on November 29, 2016, 09:32:10 AM
Hi Phil

Ah, right, that would explain it, because my multiple command syntax is writing DateCreated and TimeCreated before Composite DateTime Created.  So I can just omit the latter command.

Thanks for the explanation.  My education continues.  ;D

- Paul