Searching by 'StartDate'

Hi there,

I am programming an interface to retrieve database information from the lotus notes database.

Currently i am trying to us LNDatabase::Search function to retrieve the documents without any success.

Below are my codes:-

LNMonth = 3;

LNDay = 1;

LNYear = 2005;

LNMyDateTime.SetDate(LNMonth,LNDay,LNYear);

SearchOpt.SetBeginDate(LNMyDateTime);



LNMonth = 3; 

LNDay = 5;

LNYear = 2005;



LNMyDateTime.SetDate(LNMonth,LNDay,LNYear);

SearchOpt.SetEndDate(LNMyDateTime);



SearchFormula = "StartDate = '03/01/2005'";



db.Search(SearchFormula, &Docs, &SearchOpt);

Is there any way to retrieve the documents using the ‘StartDate’ field?

Is there anyone that can help me with this? Thanks to everyone that can offer any bit of advice.

Subject: Searching by ‘StartDate’

dates belong inside square brackets. try this and see if it works.

SearchFormula = “StartDate = [03/01/2005]”;

although if StartDate potentially has a time component then you may want to use this instead

SearchFormula = “@Date(StartDate) = [03/01/2005]”;

Subject: RE: Searching by ‘StartDate’

Hey thanks Raymond. Your codes works like magic. It certainly saves me a lot of headaches. Thanks.