Search for documents in a given DateTime range (where time of day is included)

Hi there,

I have been searching the forum low and high to find an answer as to how I can create a full text query that can find documents in a given date range. First I’ll explain the conditions/restrictions I’m working under; then why I’m trying to achieve and last, what I have tried.

The product I’m working on perfoms full text searches in view/folders in the mail database, and I have no option of changing any design elements (or add new) to the mail database. Based on input in a form I generate the search query and uses the View.FTSearch method to execute the search. The communication with the Domino server is done using Corba, but I have tested the search queries in the Notes client and the results are the same.

I have everything working but one thing; searching for mails where DeliveredDate is in a particular date range; at least it’s not working as I wanted it to. So far I can search for something like this: [DeliveredDate]>=28-04-2008 AND [DeliveredDate]<=29-04-2008 which will give me all the documents where delivered date is on 28-04-2008 in the Domino servers time zone. That’s not good enough for what I’m trying to achieve; If a user is in a different time zone that the Domino server, the date range must be a full day in the user’s time zone. Let’s say the Domino server is located in the UK (GMT+0) and the user is located in Denmark (GMT+1); the search for emails received on 28-04-2008 (Denmark time) must return all emails from 27-04-2008 23:00 to 28-04-2008 23:00 in the server’s time zone.

I have tried different approaches for specifying the date range search and I can not get it to work when specifying a time part.

This works:

[DeliveredDate]>=28-04-2008 AND [DeliveredDate]<=28-04-2008)

This doesn’t work:

[DeliveredDate]>=28-04-2008 00:00:00 CEDT AND [DeliveredDate]<=29-04-2008 00:00:00 CEDT

[DeliveredDate]>=28-04-2008 22:00:00 GMT AND [DeliveredDate]<=29-04-2008 22:00:00 GMT

DeliveredDate]>=28-04-2008 00:00:00 AND [DeliveredDate]<=29-04-2008 00:00:00

FIELD DeliveredDate > 28-04-2008 00:00:00 AND FIELD DeliveredDate < 28-04-2008 00:00:00

All examples I’ve found in the Notes help and on the internet (including this forum) only uses the date part.

So basically my questions are:

Is it possible to specify time part in the search?

if yes - how should it be defined?

TIA for any feedback provided - I really need it.

Regards

Mads

Subject: Search for documents in a given DateTime range (where time of day is included)

can you give paste LS over here.i also need to use Ftsearch with date range…it ll be help ful for me as well

thanks in advance