Save a search: no date

Hello,

How might one create and save a search for all entries for which the date field is blank?

Many thanks in advance.
  • ‘Date’ ‘does not contain’ ‘%’
  • "Date" does not support the "does not contain" parameter, and try "Date" "is not" "%" doesn't work.
  • I'd also like to know if anyone has found a solution
  • This kind of search is also important for other aspects of cleaning your library, like searching for items without attachments, looking for items missing titles, authors, journals, etc.

    I did try "Title" "Does not contain" "%" (and a version with percentage in quotes in the query box ""%""), but this did not appear to do any kind of matching against empty titles.
  • For the general question, the % is no longer necessary:

    Title -- does not contain -- [just leave the field empty]

    will find empty titles. Similarly for attachment content, publication, creators etc. Note that for titles this will also find standalone notes. If you don't want them you'll need to specifically exclude them.

    For date it's a bit more complicated. I think the way to go is:

    date -- is in the last -- 1000 years

    --> Create a saved search "1000 years"

    new advanced search

    Collection -- is not -- 1000 years

    You may need to restrict to top-level items. If you have items before 1019 in your collection, make it 2000 years. Not sure if Zotero can handle BC(E) dates in this fashion, though, so if you're a classicist, this may not work.
  • edited April 12, 2020
    Thank you this method worked for me

    Regards
  • Note that the maximum date you can put in for "is in the last" appears to be "6732 years". I do not know why this is the limit, but if I put in 6733 or higher, I end up with an empty collection.
  • edited April 13, 2020
    @dmhowcroft: 2020 - 6733 = 4713

    This is the earliest year supported by SQLite (the database used by Zotero and many other programs):
    sqlite> select datetime(0);
    datetime(0)
    --------------------
    -4713-11-24 12:00:00

    sqlite> SELECT julianday('-4713-11-24 12:00:00');
    julianday('-4713-11-24 12:00:00')
    ---------------------------------
    0.0
    From Wikipedia:
    The Julian Day Number (JDN) is the integer assigned to a whole solar day in the Julian day count starting from noon Universal time, with Julian day number 0 assigned to the day starting at noon on Monday, January 1, 4713 BC, proleptic Julian calendar (November 24, 4714 BC, in the proleptic Gregorian calendar),[2][3][4] a date at which three multi-year cycles started (which are: Indiction, Solar, and Lunar cycles) and which preceded any dates in recorded history.
    (The -4713 vs. 4714 BCE difference is due to ISO 8601.)
  • this workaround works. Thanks.
Sign In or Register to comment.