A problem with dates...
I am running Zotero Standalone 3.0.14 on an Windows XP system and I am experiencing a problem with dates. When I enter 1995-96 or 1995-1996 in the date field, what I get in the footnote is the reverse, i.e., 96-1995 or 1996-1995. The journal in question uses 1995-96. How do I correct this? Thank you in advance. MWP
Thank you for point out this dating problem. I had not noticed it, but I now see that I have three other entries that need correcting. MWP
I find it curious that an underscore symbol will produce the right order in dates, while a dash will not. i.e., 2007-2008 does not work, but 2007_2008 does. Why is this the case? MWP
2010 1993 to
in the date field, and in the footnote and bibliography, this turns into "1993 to 2010." Using "to" isn't quite correct, but it's clear to a reader.
issued: YYYY-MM-DD/YYYY-MM-DD
i.e. for your example just
issued: 1971/1972
However, I am having a practical problem implementing it: how can I search my library (4,000+) entries for those that have a date range, without going through each of them manually?
If I sort by date, it doesn't show this. If I export as CSV, BibText, etc., it is converted to a single year. If I search, I am only allowed the "before/after" type options, rather than searching for a literal character in the field.
Is there any way to search for all items with dates that are not exactly "YYYY" as literal text? (At least for my library, I have few months/days, so I could easily sort through the remainder manually.)
I'm not exactly sure what you want to search for, but I don't believe there is a way to search for whether dates have non-year parts in them. But I wouldn't both trying to fix these entries right now, but rather just wait until you are actually trying to cite them, then you will see that they have an incompletely-parsed date and can fix it then.
It is quite odd that the information cannot be extracted from Zotero in any way (I've tried a number of things) despite being displayed in the editor. The information is stored the in the .sqlite database file, but without actually parsing that into a database I can view, searching it in a text editor is not feasible (too many false positives, especially when all dates appear to be stored as "YYYY-00-00" as a default for example).
In short, there seems to be no way to figure out which entries I entered over the past 3+ years as "YYYY-YYYY" except looking at all of them (when going through the entries, the date field jumps around because the other fields change, so I can't skim it visually that way either).
The way that Zotero handles dates really is bizarre. On the one hand, I appreciate that it doesn't completely block entering literal text in the date field, but at the same time, it is so convoluted trying to deal with it (e.g., no way to search!) that perhaps it should. Finally, to make things even more confusing, the value from an exported CSV doesn't match exactly what is displayed in the sorted display in Zotero (it says "forthcoming" in the CSV for example, versus "0000" in Zotero), so there are at least 3 different date values that are used in different ways.
And even less sensibly, a date of "forthcoming" will be displayed as "0000" in the Zotero middle panes, but sorted last after all actual dates (e.g., 1999, then 2000, then 2018, then '0000'). Yet when actually used in a bibliography (either in the style preview window within Zotero or in a document elsewhere) the literal text "forthcoming" will be displayed, but it will be sorted first.
In short, none of that behavior makes any sense. Why does "issued" in extra behave differently from the "Date" field when it is the same variable? (What is the advantage of Zotero's "help" in parsing it?) Why does sort sort "0000" last (in Zotero's middle pane), but sort "forthcoming" first (in a bibliography)? Why can't I search or export "Date" in any literal way? Why does "Date" allow for text input if it is fundamentally ignored and altered by the software, but then still display the original text input when re-viewing the entry later?
Sorry for the long ramble here, but I've been manually correcting my data for hour after hour now (not only, but especially for this). The way this works is very confusing, presumably the result of trying to make compromises in the software that haven't been completely sorted out. It is now clear to me that literal text does not belong in the date field, at least not without a backup,* but I can't even figure out how to get it out of that field consistently without losing data I originally entered.
[*Specifically my plan is to do what I can with a mix of the Date field and 'issued' in extra, and then for anything outside of that, make an additional annotation reminding me to do manual correction later.]
However, now that I look at the structure of the database, it is quite indirect. There is no table of entries with the values. There is just a single table "itemDataValues" with thousands of entries, each marked by ID and value, with ID corresponding to the data structure for each item as stored in another table. This means (1) I can't view only the dates (but instead all of the data from all of the entries); and (2) I can't view the dates in the context of the entries with which they are associated.
Regardless, it is interesting (regarding the sorting questions above) looking at how the data is stored.
For an item with a date range, it looks like this:
1966-00-00 1966-1969
And for a literal text entry, it looks like this:
0000-00-00 forthcoming
Extra, of course, is just stored literally:
issued:1966-1969
I still don't understand how that relates to how it ends up sorted or getting parsed in the styles (obviously the "0000" is taken as the value instead of the literal text), but at least it's a little clearer what's happening now in the software.
Also, curiously, only one unique instance of each value, thus shared by different items in the library that have the same value. I guess that saves space (makes sense), but also makes it harder to track where things are.
(Anyone who has worked with the program's source code probably already knows this, but it might help for those like me who didn't know what was going on behind the scenes.)
Anyway, short of writing PHP code (and installing this data into a database on a server), I still don't see how I can locate the records that have complex dates in them. (The "forthcoming" ones are easy because they're sorted as "0000", so that's not a problem.) I guess I'll keep poking at it!
Edit: OK, it's possible to go through it, just very slow. Here are the steps:
1. Copy the entire 'itemDataValues' table from the SQL reader software.
2. Paste into a new Excel document.
3. Sort by the second ('Values') column.
4. Skim through for possible matches to whatever you're looking for (in my case, numbers treated as text by Excel, e.g., "0000-00-00", and specifically in realistic date ranges, e.g., "1900...."). [Note: sorting in this way allowed me to identify a range from among the 15,000 total values in my database to just about 500 that are in the range of "1900-00..."-"2018-00...", which is reasonable to look through manually. Slightly more helpful is copying that column into a plain text editor, doing find>replace for '[space]' with '[tab]' and then copying back to Excel which will split the column in two following the spaces after, e.g., '1900-00-00' and show the range, e.g. '1900-1901'.]
5. When you find an entry that looks likely, there are two options. You can track it through the database structure [*see note below for how], or much more easily you can simply type it into the (simple!) search field in Zotero to bring up all matching entries.**
6. Open a full CSV export of your Zotero library in Excel (export one if you need to)
7. Locate the relevant item by "key" in that spreadsheet.
8. Go back to Zotero and fix whatever information in the original entry.
Horribly, horribly slow, but I need to find these entries. At least there aren't too many of them.
There really needs to be a better way to do this!
...but this works (kinda) if anyone else is in the same situation as I am....
--
*Long instructions for locating an item by tracking IDs through the database:
A) Go back to the SQL reader
B) Look up that ID in the 'itemDate' table, searching for the ID in the valueID column.
C) Note the ID for the item
D) Look up that ID in the 'items' table, searching for the ID in the itemID column.
E) Copy that item's "key" (from the 'key' column).
--
**OK, this is the most bizarre thing I've discovered yet. Searching for the literal date actually works, IF you already know what to search for. So another option would be to search, e.g., all combinations of numbers of the pattern "n-n" in the field (or more strategic versions of that) until you find all entries for dates, if that seems faster than going the route of the database.
Now, answer me this: why can you search the date field's literal text through the simple search, but not restrict it to that field in the advanced search????All that would be required then would be searching for "-", but now that can't be done, so it takes all of this work.
The design of the date field in Zotero really is crazy. It half does a lot of things.
I was able to identify about half a dozen entries that I would never have found otherwise. Worth it. Not fun.
Ironically, now that I understand all of this and have fixed my library so I'll never had to do it again, it would only take me about 30 minutes now to redo all of that, after knowing what I know now.
Lesson learned: if you put a non-numerical, literal text value as "Date", always make a not in "Extra". (Or of course find some alternative. But the note will at least allow you to find it later!)
Issued: 1999/2000
(or
Issued: YYYY-MM-DD/YYYY-MM-DD
if you want month and day, too)In some styles, they're both rendered as "1999/2000", and in other styles they're both rendered as "1999-2000".
Actually, I find these to be semantically different: "1999-2000" would refer to a work that was published over two years (perhaps in multiple parts, most commonly for a multi-volume book), whereas "1999/2000" refers to a single item condensed to represent two years (most commonly for a single volume of a journal that is skipping a year in its publication history).
But I'll go ahead and change the few in my library to the slash format in case that helps with forward compatibility later. Thanks for catching that.
(Note: yes, it works for full dates, or apparently also mixed formats like "January 1-2, 2018".)
Anyway, yes, that works fine. Oddly it ends up formatted with dashes rather than slashes in all styles from what I'm seeing at the moment.
No objection from me, I'll use the slashes, thanks!
I am collecting websites of RI / DH projects in ZOTERO and want to indicate the whole funding / update period of each project as "publication date".
Here I have put "2019/2020" in the date field and it comes out like this in Chicago Manual Style:
*GFBio – Gesellschaft für Biologische Daten e.V. 2019. „The NFDI Consortium for Biodiversity, Ecology and Environmental Science“. 2020 2019. https://www.nfdi4biodiversity.org/.*
Using "issued:2019/2020" in "extras" works, indeed:
*GFBio – Gesellschaft für Biologische Daten e.V. 2019–2020. „The NFDI Consortium for Biodiversity, Ecology and Environmental Science“. 2019–2020. https://www.nfdi4biodiversity.org/.*
But I still have hope that the date field parsing will be changed at some point. :-)