Date subject created: slash and colon in use as separators

Started by hamishr, November 06, 2022, 03:57:46 PM

Previous topic - Next topic

hamishr

I want my images ordered by date subject created but they are not ordering correctly. I have worked out that this is because some images have the date with forward slash separators and others have it with colon separators. If one displays Date & Time in the file window, the inconsistency does not show up because those colons (where present) have been replaced by slashes but if one displays XMP::photoshop\DateCreated\DateCreated\0, the inconsistency shows up. In the metadata window, the display of Date subject created shows slashes but if one clicks on the field to edit it, the colons are shown.
My question is, how do I replace colons with forward slashes for the problem dates?

Mario

Metadata and ExifTool use a ISO-standardized date and time format:
YYYY:MM:DD hh:mm:ss{time zone +/- hh:mm or Z


DO NOT change metadata timestamp formats for any reason. For example, replacing : with / or similar.
IMatch converts metadata timestamps into your local time format e.g. in the Metadata Panel, in the File Window, when using variables etc. When you manually edit metadata timestamps, you must use the ISO format (see above).

The Sort Profile attribute Date & Time is based on the global File.DateTime IMatch maintains for every file. This timestamp is based on date subject created if available in the metadata. See How IMatch uses Date and Time Information for details about which timestamp IMatch uses for various file formats.

The File.DateTime is also the default timestamp used in File Window layouts, it is used for the Timeline, the Event View etc.

If sorting by Date & Time does not produce the sort order you expect, make sure the date subject created for your files is set correctly.

When you set date and time in the Metadata Panel manually (make sure you use the ISO format as expected by IMatch and ExifTool). Better use the options from the drop-down menu of date and time tags in the Metadata Panel to set date and time if you are unsure about this.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

hamishr

Thanks Mario, I have had a problem where some old files lost their metadata, I am not sure why but I would have been responsible. I am putting back in the Date Subject Created from a copy I had of it as an attribute (I can't remember why I did this). My mistake has been to use slashes and not colons when pasting in the date. I can hopefully be forgiven for this because dates are displayed with slashes. I do think that IMatch should not accept slashes as a valid entry in a date field because then you get both slashes and colons in the field and it doesn't collate correctly. So, it would be nice to do a search and replace of / for : within the Date Subject Created field but it seems you are not keen on this. My alternative is to go through quite a number of files and do this manually. 

Mario

You can use / to format the date, e.g. 2022/10/06 and IMatch will take this 'as-is'.
No / for the time part, though.

When you write back, ExifTool accepts the / as the date separator but returns the date again in the standard ISO format it and IMatch use. So 2022/10/06 can be used as input, but after write-back it will again show as 2022:10:06.

You cannot use 'local' date and time formats when you directly manipulate metadata timestamps.
If you want to input date and time manually using your local date and time format, use the drop-down menu command "Select Date" which allows you to input date and time and IMatch automatically converts it:

Image6.jpg


Image5.jpg


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

hamishr

Thanks Mario, it turns out that there were only 5 files with this problem. The other times I used the slash for the date (in other subdirectories) it did come back as colons, as you explained. I did an experiment with one of the five files that were giving a problem and forced a date change and then wrote back to the file but the slashes remained. Well, I have just manually changed the slashes to colons in these files and all is now resolved. I will keep to colons in future. Thank-you for your help.