Using dates in searches

The quote below was posted in the DEVONagent section, but similar questions can be raised about how to make use of dates for searching and analyzing information in DEVONthink.

DEVONthink will let one “slice and dice” data in a lot of ways. DT’s Boolean search operators are not as powerful as those in DEVONagent (but watch for future updates!), but if you think out the logic of a query that you want to make, DT can do very complex searches and data manipulation.

Remember, of course, that DT is a freeform database (although the current alpha version of DT Pro allows tables and records, that hasn’t been released yet). Also remember that dates can be written in many ways, which can complicate things.

DT always date stamps items with their creation date and their modification date.

Here’s a simple example. Suppose some benevolent person pays me ten cents for each item I add to my database. Now suppose a question arises as to how many items I added from May 3, 2003 to June 14, 2003.

That turns out to be easy.
[1] Create a new group, “May-June 2003” anywhere you wish.
[2] Open the Search tool. Set it to search Comments, Global and enter the search term 2003.
[3] Sort the hit list by Date (if the header is Modified, click to change to Date).
[4] Select the first item for May 3, 2003. Hold the Shift key down and navigate to the last item for June 14, 2003, and click on that item. All the relevant hits are now selected.
[5] With the cursor over the highlighted items, Control-Click to bring up the contextual menu, and choose Replicate to > May-June 2003.
[6] Now look at the receiving group. There are 172 items in it (that’s low nowadays – I add that many every day or two). OK, I can verify a bill for $17.20.
[7] While I’ve got that group of items I could ask other questions about it. For example, do a search just for that group and ask whether the term “Einstein” occurs (2, but neither was Albert). Or, suppose I can’t charge for PDF files added to the database. Open the group in List view and sort by type. OK, no PDF files, so the billing stands.
[8] Now, if I wish (and I probably do), I can delete the “May-June 2003” group. No harm done, since the contents were merely replicates of existing files.

Think about the logical power of being able to temporarily "break out" items for analysis in a variety of ways. :slight_smile:

Here’s another example that might generate useful ideas. Suppose I keep a client list, and each time there’s activity with a client (a call, for example) I add that information to the client’s file – which results in an updated Modification Date. Just by opening the client list group in list view, and sorting by Modification Date, I can quickly review which clients haven’t been contacted recently. Or, by sorting by Size I can tell which files have the most “activity” (as defined by notes added to the file). There’s an almost endless series of tricks that could be used to analyze the data and plan for action.

Of course, with tables and records, DT Pro will allow addition of record fields of the user’s choice in a database. Even more power!

Update Monday, September 13, 2004 6:57:42 PM: Oops! The command “Replicate to” isn’t in the current release of DT PE, but is in a pre-release version of DT Pro. I’m pretty sure it will be available in DT PE 1.9. Obviously, it’s an enormously useful feature.


And, if I just want to find the last files where a certain word or phrases exist, how much easier it would be if I could just search the database using the search tool, and sort the result by “Date Created” and group them.
Two or three steps instead of eight, simple, intuitive and technically not too much of a challenge. Thats what I’m looking forward to!

Yeah, your example is easy. Search for a term, then sort the results by date and inspect the list. That’s already built in to DT.

But what if you don’t know any common search term to look for, and you’ve got a hundred or more groups in your database, among which your records are scattered? DT doesn’t have a date range search term, but my example shows how to do such a search in about a minute, from start to finish. As usual, it takes a lot longer to write out a procedure than to do it!

Intuit that approach, and a host of techniques to address real-world information needs become apparent! There are endless ways to manipulate and analyze information using that "Replicate to" trick for data aggregation or disaggregation. (There are many other tricks that would be useful, and it will be fun to discover some of them.)

“Tricks” like my date range search example show how the user can greatly extend the built-in searching ability of DT so as to extract information from a database. And that will remain true, no matter how much DT’s built-in search tools may be enhanced in future releases. :smiley:

Problem is, it isn’t. Search results can be sorted by score, name and size. Not by date created or modified. Also you cannot create groups within the search result.

Sorry, Mats. I’ve been using pre-release versions of DT Pro 1.9 so long that I’ve forgotten what’s in the current DT PE version.

Rest assured that you will be able to sort by Date or Date Modified in the Search Tool window, when version 1.9 is released.

In my example of replicating selected search hits to a new group, I first had to create that new group (anywhere in the database that I wish, in seconds), then replicate the selected items to it, using a contextual menu option.


I have a question regarding this search technique.  Nowhere in my database is there any data in the comments field.  Does this mean that there is a setting to add the date on creation of an item?  I realize that in the info panel the creation date exists, but see no mechanism to sort on it.  Am I missing something?



DT PE 1.9 and DT Pro 1.9 will provide for sorts by creation or modification date in the Search Tool window. Version 1.9 should be out any day now.

DT datestamps record creation and record modification. You’ll see that in the Info panel (but not in the Comment field).

I am running DT PE 1.9beta2.  I fail to see anything in the search field regarding dates in the creation or modified area.  Am I missing something?

Thanks - Allan

No, the search criteria do not include date. (Wish they did.)

But the Search Tool horizontal view shows a date column, and you can sort on it. That’s key to the trick I first talked about.

And both the search and history windows of DT PE/Pro 1.9 will support the "View > Sort > by…" commands too and therefore it will be possible to sort by creation/modification date, by path/URL, by name, kind etc.