DateTime format in file windows

Started by busbahnhof, March 18, 2021, 01:37:50 PM

Previous topic - Next topic

busbahnhof

Per default the header 2 left shows "Datum & Zeit (kurzes Format)" (sorry, I don't know the translation in the English software version), like this: 19.05.2009 15:58  --> as far as I learned: CreateDate + Offset

But what I want to see is the UTC time. So I use "Erstellungsdatum", it shows 2009:05:19 14:58:57+00:00  --> without offset

I tried to get a better format with {File.MD.XMP::photoshop\DateCreated\DateCreated\0|format:DD.MM.YYYY hh:mm:ss}. So it shows 19.05.2009 14:58:57. But I haven't found anything in the IM help to show the +00:00. What do I have to do in this case?

Mario

You could use {File.MD.XMP::photoshop\DateCreated\DateCreated|value:rawfrm} to get the date and time directly from the raw metadata (with or without time zone information, depending on whats in the file).
Metadata Variables: Formatted and Raw
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

busbahnhof

Yes, this works. But then the format is again 2009:05:19 14:58:57+00:00.

I was just looking for a different way to show the date like   19.05.2009  . But if that is not possible together with showing the time zone, it is OK. I just want to be sure I didn't miss anything.

Mario

If you need to do such a thing, use one variable for formatting the date as you did, and another with substr to extract only the time-zone portion from the raw tag? This is easy to do.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

busbahnhof

Coding is kind of fun :-)

The time zone +00:00 is now shown correctly, but hh:mm:ss still adds one hour offset to the UTC time.

busbahnhof

I will close this one. substrr is a nice function, but it is a bad solution in this case. If the {File.MD.XMP::photoshop\DateCreated\DateCreated\0} contains a time zone information like "+00:00", everything is good. But if it doesn't contain time zone information, it looks just weird (24.10.2020 09:53:48:48.89). Maybe I can code some lines to insert some if-clauses or whatever. But I will continue working with pictures and not code ;-)

Thanks anyway for your time! Your support is very appreciated!