where clause not working with AND operator

Mohammad Qasim 576 Reputation points
2021-03-15T18:26:40.62+00:00

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

SharePoint Server Development
SharePoint Server Development
SharePoint Server: A family of Microsoft on-premises document management and storage systems.Development: The process of researching, productizing, and refining new or existing technologies.
1,575 questions
0 comments No comments
{count} votes

Accepted answer
  1. MichaelHan-MSFT 18,016 Reputation points
    2021-03-16T03:01:10.51+00:00

    Hi @Mohammad Qasim ,

    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.


0 additional answers

Sort by: Most helpful