Any way to modify the Date Added?
I understand that the "Date Added" field is populated once upon creation of the record and then never touched again. This is generally fine, but when you import thousands of items from your previous reference management software (Citavi, in my case), this means loss of data as the date created will be the date when the records were imported.
My switch to Zotero happened years ago, but the missing information about when I added an item to the database keeps bugging me until today (I didn't anticipate that this date would be so meaningful in providing contextual information for an item).
I do have the information preserved in the "extra" field in this format:
Created: 2016-04-14T21:22:01
Modified: 2016-04-14T21:22:01
and I wonder whether there is any way of writing these into Zotero's "Date Added" field (and possibly also "Modified", though some extra logic would be necessary for this to prevent more recent dates to be overwritten).
Since this is one-off operation, it doesn't need a fancy UI. Perhaps it can be done with a python script? It doesn't look like the zotero API allows write access to dateAdded, so Pyzotero doesn't seem to be an option. Can it be done by accessing the sqlite db directly?
My switch to Zotero happened years ago, but the missing information about when I added an item to the database keeps bugging me until today (I didn't anticipate that this date would be so meaningful in providing contextual information for an item).
I do have the information preserved in the "extra" field in this format:
Created: 2016-04-14T21:22:01
Modified: 2016-04-14T21:22:01
and I wonder whether there is any way of writing these into Zotero's "Date Added" field (and possibly also "Modified", though some extra logic would be necessary for this to prevent more recent dates to be overwritten).
Since this is one-off operation, it doesn't need a fancy UI. Perhaps it can be done with a python script? It doesn't look like the zotero API allows write access to dateAdded, so Pyzotero doesn't seem to be an option. Can it be done by accessing the sqlite db directly?
https://www.zotero.org/support/dev/client_coding/javascript_api
(Do not modify the DB directly.)
Just to double-check, since there is an example at the bottom of the page that shouldn’t be used because it ”has not been updated for Zotero 5”: are all the other examples fit for Zotero 7?
I had this issue as well (well, not personally, but the users I support during our migration from EndNote to Zotero).
I decided to bash together a python script to pull the required data directly from the EndNote library instead of messing with EndNote itself, as it's apparently just a sqlite db under the hood.
Then I had the issue that Zotero doesn't import those dates, so I also wrote a small plugin that reads in created/added dates from Notes and changes the fields accordingly.
You can find a short guide with links on my website here:
https://libraet.samuelmok.cc/posts/endnote-export/
I turned the python script into an standalone executable with GUI for ease of use, but if you want/need the source python file you can find it on my github as well: https://github.com/utsmok/endnote-exporter - also includes binaries for macos/linux (untested).
And of course the same goes for the plugin:
https://github.com/utsmok/endnote-date-fixer