Is there a way to control or adjust how the “Set Date As” menu item parses dates? For example, when I open a PDF and select a date in the file (“02/10/2020”, which in my case is 2 October 2020), right click, and select “Set Date As”, the Created date of this document is set to 10.02.20, i.e. 10 February 2020, which is the wrong interpretation of the date string. This also means that it is parsing the date string using a different format from how dates are displayed in my user interface.
Is there a way to fix this?
Strangely, in the same right-click context menu, if I select “Show This Date in Calendar” instead of “Set Date As”, Calendar correctly opens to 2 October 2020! So, this other menu option seems to handle dates differently.
I’m using DEVONthink 3.7.2 Pro edition, in case that makes a difference.
Under System Preferences > Language & Region > General I have: Region: Germany, Preferred languages: English (UK) — Primary; English (these settings are correct for me, i.e. I am in Germany and work mostly in English). The example date strings show 18.11.21, which is what I would expect.
Is there somewhere in DEVONthink that I need to set a locale, too (or even, as you suggested, on a per-database or per-file basis)?
Ah, that’s a shame. So is there nothing I can do right now to fix it, I presume?
I seem to remember having success with a script in DEVONthink 2, but can’t remember which one or exactly how it worked (e.g. whether it would read the date from the selection, or if I had to copy-paste it from the document into a dialogue box that would appear). Do the scripts from DEVONthink 2 also work in DEVONthink 3?
Do the scripts from DEVONthink 2 also work in DEVONthink 3?
Generally speaking, yes they should.
I have a question about interpreting dates. You said…
select a date in the file (“02/10/2020”, which in my case is 2 October 2020)
How do you know this with just any file?
I can see it if it’s a file you created or there’s known content pointing to things happening in October. But say I sent you a document and said I sold my house on 03.09.2021. Would you assume I sold the house in September?
If you were writing to me in German or French - yes, I would. If you were writing in American English, I’d assume that it was March. If I were a pedantic person, I’d tell you to specify the date in ISO format.
I agree with @chrillek but would slowly get the point (as befits a UK senior citizen) as it dawned on me that you came from a different world. <Sigh> It’s like this “9/11” business…which was of course “11/9”.
That would depend on where I was, and where you were. I’m aware that the format is ambiguous (I was going to mention that in my original post but thought it might be too much detail).
However, where I am and where my documents come from, essentially all dates are in DD.MM.YYYY format and not MM.DD.YYYY, and the rest of the system works like that. I was surprised to see the date parsed as MM.DD.YYYY given that (as far as I know) all my preferences/settings are set to DD.MM.YYYY, and even the DEVONthink user interface is displaying dates like that (DD.MM.YY).
For example, this means that the string “02/10/2020” in the PDF gets parsed by DEVONthink and then is immediately displayed back to me in the “Created” column in the user interface as “10.02.20”. The inconsistency was what made me think it was a bug or misconfiguration on my side. If DEVONthink always displayed dates in the UI as MM.DD.YY then I wouldn’t have been so surprised (although it would still have been inconvenient). So, I was hoping there would be some way to say “assume dates are in the same format as the UI”, or “assume this specified date format”.