Search in SharePoint Search records between date ranges

This is my attempt to get entries below date:

SELECT Title, XXXX from area (), where "scope" = 'XYZScope' AND XYZDate <1/1/2007 12:00:00 AM

It says "Exception from HRESULT: 0x80040E07"

Please, help.

+3
source share
3 answers

Your dates must be in a different format: ISO 8601

Example:

2008-10-13T14:05:31-05:00

I could never get ESSQL to work with dates that still had a time component, but I have something working using days.

Your query should look something like this:

SELECT Title, XXXX from scope() where "scope" ='XYZScope' AND XYZDate < '2007-01-01'
+3
source

DATEADD. :

SELECT WorkId, Path, Title, Write, Author FROM Scope() WHERE XYZDate < DATEADD (, 30, GETGMTDATE())

+1

:

SELECT Title, XXXX (), "scope" = 'XYZScope' AND XYZDate <= '2007-01-01 12:00:00'

FullTextSqlQuery.Execute , . - -

... XYZDate date1 '2007-01-01 12:00:00'

date1 Date.MinValue

( ) , .

0

Source: https://habr.com/ru/post/1717997/


All Articles