Search by date range


Hi! Is there any way to set up a search to search for results between a range of dates? So, say, all items between 1935 and 1960?

Also, if we have a folder that covers a date range (dcterms:date 1935/1960), is there any way to make it appear if we do a search for a date between that range - say, 1940? Right now it only appears if we search for either 1935 or 1960.



There is currently no way to do what you describe. We recognize the importance of searching dates and are looking into ways to make it possible.


A related issue: “Add numerical comparisons query type”

As a workaround, many installations use an external indexing, i.e. Solr (see Solr module).


The Numeric Data Types module allows users to search a range of dates, among other numeric-based searches.


Oh wow, I’m going to go play with this now! Thank you so much!!


This is awesome, but I have a few questions:

First, I’ve noticed that any dates that I already have attached to my items remain as text fields even if I change the date field to Numeric:Timestamp in its related resource template, and as such don’t show up in the new date search. I can see how this would be great for new items, but I don’t know what to do about the close to 7,000 items I already have catalogued. Would I have to go into each one individually and re-enter their dates?

Second, my items have either a specific date (1947-12-31), month (1947-12) year (1947), or range (1947/1953 or 1947-09/1947-12 or 1947-12-15/1947-12-17). I was very careful to keep everything ISO 8601 compliant. Looking at this module, it seems to only allow a single date (or month or year) to be used, but not a range. Is that right? Ideally, I’d like for a date search for 1950 to pull up a folder with a date range from 1947 to 1953.

Thank you so, so much. This is a great step forward!



Please refer to the module documentation if you haven’t already:

Yes, you will have to change each one individually. The module does not assume existing date strings are in a valid format. Because of this, only new values of a numeric:timestamp property are parsed as a timestamp.

The module does not implement ISO 8601’s time interval format. Instead you search a range by selecting a “Date comes after” and a “Date comes before” against your respective time point properties. You can use the same property (e.g. Date) for the start and end time point.


Gotcha. Still awesome, thanks!



Oh, one more question - if I use the CSV import module to bulk import and put a compliant date (not a range) in the date field and declare a resource template that uses the numeric:timestamp definition for the date field, will it work? Thanks!


The CSV Import module is only capable of importing the native data types (literal, uri, and resource) even when declaring a resource template that uses a data type introduced by a module.


I was wondering if you came up with any creative solution to this issue, i.e., importing dates as strings and adjusting them to the timestamp data types.