question

MohammadQasim-1438 avatar image
0 Votes"
MohammadQasim-1438 asked ·

where clause not working with AND operator

Hi,

fetching data from Sharepoint online , to shoe data on asp.net page.

Problem : Where clause not working with And operator to fetch records , based on date.

Solution Required: I need to know , how or what to write in query to fetch data accordingly.
attached image is added for reference.
77884-expirydatewherecluase.png

Thanks


office-sharepoint-server-development
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

MichaelHan-MSFT avatar image
0 Votes"
MichaelHan-MSFT answered ·

Hi @MohammadQasim-1438 ,

The DateTime in SharePoint needs to be in specific format : yyyy-MM-ddTHH:mm:ssZ. The variable dtexppiry should be configured like the below:

 string dtexppiry=DateTime.Today.ToString("yyyy-MM-ddTHH:mm:ssZ"); 


If an Answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


· 1 ·
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Thanks, works fine

0 Votes 0 ·