Author Topic: "CreateDate" and "DateTimeDigitized" the same?  (Read 4548 times)

pacman

  • Full Member
  • ***
  • Posts: 49
"CreateDate" and "DateTimeDigitized" the same?
« on: April 29, 2016, 06:37:26 PM »
Are the [XMP-xmp] CreateDate and [XMP-exif] DateTimeDigitized tags the same (or serve the same purpose)?

I ask because I'm trying to add date/time tags to PNG files not already having them (scanned images) for use in Adobe Lightroom and noticed that even by adding "Alldates" and copying the file creation date to it (-AllDates<MDItemContentCreationDate) no date was shown for that image in Lightroom. But by creating a "DateTimeDigitized" tag and copying the creation date to it (-XMP-Exif:DateTimeDigitized<MDItemContentCreationDate) that date would show up in Lightroom (as "Date Time Digitized").

But here's the strange thing: when I save keywords to the image within Lightroom, then check the same file with exiftool (exiftool -a -G1 -s FILENAME.PNG) the "DateTimeDigitized" tag is gone, but the date I put there now shows up in the [XMP-xmp] CreateDate tag!
Lightroom still displays that file's date as "Date Time Digitized" though. Strange indeed!
Prior to saving keywords in Lightroom the file did have similarly named tags:

[ExifIFD] CreateDate
[PNG] CreateDate
[ExifIFD] CreateDate

... but neither of them contained the same date as I had assigned to "DateTimeDigitized" so Lightroom is seemingly, for reasons unknown to me, converting "XMP-exif:DateTimeDigitized" to "XMP-xmp:CreateDate". This is why I'm asking if the two tags are the same, or represent the same thing?

I've learnt from previous discussions here that adding metadata to PNG files is a little unpredicatble since there's no apparent standard, so this could be the reason for this happening, but I thought I'd ask, which will help me figure out just which date tags I should add to a file not already containing it/them.

PS: testing another scanned image (also with missing date tags) but in the JPG format, and adding all three tags in exiftool (-AllDates<MDItemContentCreationDate) results in all three tags being displayed in Lightroom (Date Time Original, Date Time Digitized and Date Time). Adding the "DateTimeDigitized" tag and copying its date from the (newly changed) file creation date results in the new date being shown alongside "Date Time Digitized" in Lightroom, so that seems correct.
Now for the crucial comparison: like with the PNG file, the JPG file also got the "digitized" tag removed after having keywords saved in Lightroom. And similarly that new date was transferred to the [XMP-xmp] CreateDate tag. I also noticed that a new tag had been created, also with that same date: [ExifIFD] CreateDate.
« Last Edit: April 29, 2016, 06:50:41 PM by pacman »

StarGeek

  • Global Moderator
  • ExifTool Freak
  • *****
  • Posts: 2569
Re: "CreateDate" and "DateTimeDigitized" the same?
« Reply #1 on: April 29, 2016, 09:10:35 PM »
One thing to remember is that AllDates is just a shortcut for DateTimeOriginal, CreateDate, and ModifyDate.  Exiftool's prefered placement for those tags is in the EXIF group.  But PNG files don't support EXIF, though ExifTool has a workaround for it.  Lightroom doesn't support this workaround which is why you won't see the dates in Lightroom for PNG files.

Personally, I save my scanned images in TIFF format.  It supports EXIF, IPTC, and XMP and Lightroom shouldn't have any problems with it.

But as to your main question, I don't know if they're considered the same tag and I really have no idea why LR is doing what it's doing.  I've also notice it deleting tags, at least for my ver 4.4.  If there are XMP GPS tags, they'll get deleted and the data saved in the EXIF GPS tags.

Troubleshooting hints:
* When posting, include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).
* Double all percent signs (%) in a Windows batch file.
* If your GPS coords are negative, make sure and set the GpsLatitudeRef and GpsLongitudeRef tags correctly.

StarGeek

  • Global Moderator
  • ExifTool Freak
  • *****
  • Posts: 2569
Re: "CreateDate" and "DateTimeDigitized" the same?
« Reply #2 on: April 29, 2016, 09:18:22 PM »
Further searching and I find this in the MWG Guidelines.

Digitized Date/Time – Creation date of the digital representation
Exif DateTimeDigitized (36868, 0x9004) and SubSecTimeDigitized (37522, 0x9292)
IPTC DigitalCreationDate (IIM 2:62, 0x023E) and DigitalCreationTime (IIM 2:63, 0x023F)
XMP (xmp:CreateDate)

So XMP:CreateDate and EXIF:DateTimeDigitized are supposed to serve the same purpose.  And I believe that [XMP-exif] DateTimeDigitized is just an XMP copy of the EXIF data.
Troubleshooting hints:
* When posting, include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).
* Double all percent signs (%) in a Windows batch file.
* If your GPS coords are negative, make sure and set the GpsLatitudeRef and GpsLongitudeRef tags correctly.

pacman

  • Full Member
  • ***
  • Posts: 49
Re: "CreateDate" and "DateTimeDigitized" the same?
« Reply #3 on: April 30, 2016, 02:35:49 AM »
Thanks for explaining. Yes, it does indeed seem that we're within "non-standard" territory with PNG files and Lightroom. I don't understand what it's doing, but somehow the date is kept, which is my main goal (Lightroom changes the current OSX file creation date whenever metadata is saved to the file, so that date will no longer be of use, which is why I'm working on creating EXIF date headers in the first place).

Lightroom seems to further do things in a non-standard way because the correct date is indeed kept, but shown as "Date Time Digitized" in Lightroom itself while that actual tag isn't present at all when anaylyzed with exiftool. Oh well... As long as it works...  ;)

Scanning as TIFF is a good idea (so is JPG), but I already have a lot of PNG scans in my collection from before. Likewise, screenshots in the same format without any EXIF dates within, so I have to deal with this if I want to keep the date. In addition I plan to have Lightroom rename them all by adding the date to the filename itself -a double safety mechanism for keeping the scanned date.


Anyway, I did a new test with a JPG file this time, where I only added the DateTimeDigitized tag (but not the other three using "-alldates") and it looks great in Lightroom. Likewise for a scanned JPG file. Even using Mac OSX's "Preview" app the correct date is shown ("Date Time Digitized" EXIF tag and "Digitial Creation Date" IPTC tag). But from everything I've read it seems "DateTimeOriginal" is the failsafe, standard date tag for digital images. Furthermore it seems the three covered in "-alldates" are standardized and essential to all image files, correct?

So having said all that: my new question is if it's a problem to create a script which will add all four following date/time tags to images missing date information? So far, the exif command will be:

$ exiftool -r "-AllDates<MDItemContentCreationDate"  "-XMP-Exif:DateTimeDigitized<MDItemContentCreationDate" -P -overwrite_original_in_place -if 'not $exif:alldates' .




« Last Edit: April 30, 2016, 05:02:15 AM by pacman »

Phil Harvey

  • ExifTool Author
  • Administrator
  • ExifTool Freak
  • *****
  • Posts: 14895
    • ExifTool Home Page
Re: "CreateDate" and "DateTimeDigitized" the same?
« Reply #4 on: May 02, 2016, 09:13:15 AM »
That command looks reasonable.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

Plenz

  • Newbie
  • *
  • Posts: 5
Re: "CreateDate" and "DateTimeDigitized" the same?
« Reply #5 on: September 05, 2016, 04:22:41 AM »
Is this command really reasonable? I also try to change DateTimeDigitized and it does not work.
Seems that this tag is not writable, right? I am using exiftool 10.23.

Plenz

  • Newbie
  • *
  • Posts: 5
Re: "CreateDate" and "DateTimeDigitized" the same?
« Reply #6 on: September 05, 2016, 05:08:50 AM »
Update: "-AllDates" works for me. Problem solved.  :)

Phil Harvey

  • ExifTool Author
  • Administrator
  • ExifTool Freak
  • *****
  • Posts: 14895
    • ExifTool Home Page
Re: "CreateDate" and "DateTimeDigitized" the same?
« Reply #7 on: September 05, 2016, 08:16:29 AM »
Just FYI, DateTimeDigitized is called CreateDate by ExifTool to be consistent with other metadata types.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).