Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I'm getting data with BDC in order to query it with Search Server. All is good, but I don't find how to compare two dates: my query looks like this:

ClaimDate =< 01/01/2011 AND [...]

Any ideas?

share|improve this question
    
Can you please provide some more info? Compare ClaimDate and another date or compare ClaimDate dates between two values? –  Anita Boerboom Jul 9 '11 at 21:27
    
What did you try already and what were the results? –  Anita Boerboom Jul 9 '11 at 21:50
    
this is my query: –  ppmax Jul 11 '11 at 6:47
    
<QueryPacket Revision="1000" xmlns="urn:Microsoft.Search.Document.Document"> <Query> <Context> <QueryText language='fr-FR' type='STRING'>ClaimDate < 01/01/2011</QueryText> </Context> <SupportedFormats> <Format>urn:Microsoft.Search.Response.Form.Form</Format> </SupportedFormats> <Range> [....] </Range> <TrimDuplicates>true</TrimDuplicates> <Properties> [.....] </Properties> </Query> </QueryPacket> –  ppmax Jul 11 '11 at 6:49
    
And always no results! –  ppmax Jul 11 '11 at 6:56
show 1 more comment

2 Answers

Why aren't you using:

<QueryPacket xmlns='urn:Microsoft.Search.Query' Revision='1000'>

You query doesn't look like a fulltext query, but like a keyword query, it that correct? A reference can be found here to build the different queries: http://www.itidea.nl/index.php/example-of-using-the-spservices-search-web-service/

Probably the date format isn't correct either, I could be wrong, but I guess it has to be something like: 2011-04-08T13:45:47+02:00

share|improve this answer
    
I change my code with that: <QueryPacket Revision="1000" xmlns="urn:Microsoft.Search.Query"> <Query> <Context> <QueryText language='fr-FR' type='STRING'> ClaimDate > 2010-04-08T13:45:47+02:00</QueryText> </Context> [....] But no result found again! –  ppmax Jul 11 '11 at 8:49
add comment

If managed property in search service, try this

ClaimDate:1/1/2012..1/1/2013

This should search for all files that have claim date between these two dates.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.