ExifTool Forum

General => Metadata => Topic started by: sgbotsford on February 28, 2012, 01:11:23 AM

Title: Partial date informaton.
Post by: sgbotsford on February 28, 2012, 01:11:23 AM
My reading of the IPTC standard is that partial date formats are legal:

However the following takes place:

exiftool -CreateDate=2007:07 77-GreenBinder001.tif
Warning: Invalid date/time (use YYYY:mm:dd HH:MM:SS[.ss][+/-HH:MM|Z]) in ExifIFD:CreateDate (PrintConvInv)
    0 image files updated
    1 image files unchanged

Now the IPTC is not specific as to how partial dates are to be stored.  I would suggest the convention of using zeros for unknown fields in dates, and 99 for unknown fields in times (since 00:00:00 is a valid time. Zeros for dates would mean that they would be at the beginning of the month in date sort order.  9's for time would mean they would be at the end.  This would argue for consistency that unknown dates should have numbers larger than their index value. 

Another possibility is to store blanks.  This puts unknowns ahead of knowns in the sort sequence.

Anyway, I've got 20000 slides with year month data and nothing else.  What's your suggestion folks for how to set the date?

I also have several thousand photographs where I know the month/day/time, but not the year.

Title: Re: Partial date informaton.
Post by: BogdanH on February 28, 2012, 01:22:24 AM
Hi,

Tag CreateDate exist for both sections: Exif and for Xmp. If you don't specify the section, then tag will be written into Exif section (which has priority over Xmp). For Exif, however, CreateDate doesn't allow partial values. So, you should use:

exiftool -Xmp:CreateDate=2007:07 77-GreenBinder001.tif

Bogdan
Title: Re: Partial date informaton.
Post by: Phil Harvey on February 28, 2012, 01:16:42 PM
I think we're confusing standards here.  ExifTool calls the old IPTC-NAA IIM format "IPTC".  The newer IPTC4XMPCore specification is "XMP".  However, your command writes the EXIF CreateDate.

The IPTC-NAA IIM specification states: (ExifTool's "IPTC")

QuoteDigitalCreationDate:  Represented in the form CCYYMMDD to designate the date the digital representation of the objectdata was created. Follows ISO 8601 standard. Thus a photo taken during the American Civil War would carry a Digital Creation Date within the past several years rather than the date where the image was captured on film, glass plate or other substrate during that epoch (18611865). Example: "19900127" indicates digital form of the objectdata was created on 27th January 1990.

You may writes dates like this with ExifTool, although all dates are specified in EXIF format ("YYYY:MM:DD")

The XMP specification states:  (ExifTool's "XMP")

QuoteCreateDate: The date and time the resource was  originally created.  A date-time value which is represented using a subset of ISO RFC 8601 formatting, as described in  http://www.w3.org/TR/Note-datetime.html. The following formats are supported:
YYYY
YYYY-MM
YYYY-MM-DD
YYYY-MM-DDThh:mmTZD
YYYY-MM-DDThh:mm:ssTZD
YYYY-MM-DDThh:mm:ss.sTZD
The time zone designator is optional in XMP. When not present, the time zone is unknown, and software  should not assume anything about the missing time zone. 

You may writes dates like this with ExifTool, although all dates are specified in EXIF format ("YYYY:MM:DD HH:MM:SS")

The EXIF specification states:

QuoteDateTimeDigitized:  The date and time when the image was stored as digital data. If, for example, an image was captured by DSC and at the same  time the file was recorded, then the DateTimeOriginal and DateTimeDigitized will have the same contents. The format is  "YYYY:MM:DD HH:MM:SS" with time shown in 24-hour format, and the date and time separated by one blank character [20.H].  When the date and time are unknown, all the character spaces except colons (":") may be filled with blank characters, or else  the Interoperability field may be filled with blank characters. The character string length is 20 bytes including NULL for  termination. When the field is left blank, it is treated as unknown.

You may writes dates like this with ExifTool, although you must use the -n option, otherwise ExifTool will complain.  Also, ExifTool calls this tag "CreateDate" to be consistent with XMP.  I don't recommend writing partial dates in EXIF though.  They aren't very common and may confuse some software.

- Phil

Title: Re: Partial date informaton.
Post by: BogdanH on February 28, 2012, 02:27:11 PM
Hi Phil,

Altough this "old/new" IPTC standards can be quite confusing... what surprised me, was the last paragraph: I had no idea, that with ExifTool's -n option, one can write partial dates into Exif!
As you said, it's really not recommended doing this (Exif specs are specific on this) -but for "experimenting", it's good to know that ExifTool can do it  :)

Bogdan