Updating XMP: Date/Time Original with Metadata Template

Started by Ceiriog, June 18, 2014, 05:56:59 PM

Previous topic - Next topic

Ceiriog

I am trying to update the XMP: Date/Time Original tag from a date taken attribute (formerly a property in iMatch 3).  The images are prior to digital cameras and have minimal exif date.  I had a data base with the approximate dates the pictures were originally taken and used this to create a property in iMatch 3.  When I update the XMP date the update completes and a few seconds later, the information disappears.  I think I need to set something in the Metadata 2 tab, but can't find any info in help.  Any ideas?

Mario

Are you using the correct date and time format?
ExifTool expects the format YYYY:MM:DD HH:MM:SS when writing metadata, and this is the format you have to produce.

Your post does not contain sufficient information to help you.

1. Show your Metadata Template, and what you copy from where to where.

2. Show us the contents of one of your Attributes so we can see what you are copying.

3. Run your template on one file.

4. Open the ExifTool output panel as described here

5. Write-back the data to the file (if you don't have background write-back enabled)

6. Copy/Paste the ExifTool results to your reply.


-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

Ceiriog

Some additional information:

The template I am using has only 1 Tag to be updated: XMP::exif\DateTimeOriginal
Fill the tag from this data: {File.AT.Image.Taken}

{File.AT.Image.Taken} is an Image file Attribute of type 'Date'
Since this is a "date" type attribute and I need to update a Date and Time Tag, I am getting an invalid Date/time error, which is causing my update to fail - see log file below.

Is there a way to format a "date type" attribute into the required "yyyy:mm:dd" format and append a "12:00:00" time stamp to create the proper date\time format for the update.  I have tried several combinations, the seems to be no way to reformat the date attribute.  I even created a new date and time attribute and loaded it manually and then tried to use it in the template.  It also failed with the invalid date\time message.

I ran the template with an actual value as follows:

Tag to be updated:              XMP::exif\DateTimeOriginal
Fill the tag from this data:   1970:07:26 12:00:00

This update worked fine, so I think it is just a matter of formatting the {File.AT.Image.Taken} attribute.


The results from the log file are listed below.

-overwrite_original
-m
-use
MWG
-charset
ExifTool={PTETCHARSET}
-ex
-sep

-XMP-exif:DateTimeOriginal=27/07/70 12:00:00 PM
-XMP:CreatorTool=photools.com IMatch 5.1.0.4 (Windows)

-xmp:InstanceID=xmp.iid:f96621ef-6bc6-44a4-aa9d-1c5bf718f319

-MWG:ModifyDate=now
-XMP:MetadataDate=now
C:\Users\Ian\Pictures\Dad's Slides\1970\197007g003.jpg
-execute9999

    1 image files updated

----- Runtime: 0.1 s.
Warning: Invalid date/time (use YYYY:mm:dd HH:MM:SS[.ss][+/-HH:MM|Z]) in XMP-exif:DateTimeOriginal (PrintConvInv)

Ceiriog

I believe I have solved the problem.  I went into control panel and changed the short date display to "yyyy-mm-dd".  When I append a "12:00:00" time value to the date attribute, it is accepted as valid - even though the separators are dashes instead of colons.

Mario

Don't change your system date and time format settings. Just format the variable correctly before writing them into a date and time field. IMatch has all the functions you need for that.

You need to produce the following format:

YYYY:MM:SS HH:MM:SS

IMatch by default formats date and time variables using the date and time format set for the current user. This way, when you display a date from a variable somewhere, it looks exactly like other date and time displayed by Windows.

But you can tell IMatch how to format date and time variables by specifying a format. This allows you to produce the format ExifTool expects. In your case, something like

{File.AT.Image.Taken|format:YYYY:MM:DD}

would do the trick. Since you have only a date but also need a time, try

{File.AT.Image.Taken|format:YYYY:MM:DD} 12:00:00

Unfortunately, this works only with Metadata variables (File.MD....} currently. Formatting of Attributes variables has not been implemented, only methods like count, sum, avg are supported.

I will look into this for one of the next builds.


-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

Mario

I have fixed this for the next build (5.1.0.6). You can then achieve what you want without changing your system date format settings.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook