Activity Forums Salesforce® Discussions How can we use Datetime field as a criteria in SOQL Query in Salesforce?

  • Piyush

    Member
    August 22, 2019 at 3:48 am

    Hi Prachi,

    We cannot use Datetime as condition in Where Clause in between single Quotes.

    You can do something like this ,

    WHERE CreatedDate > 2005-10-08T00:00:00Z

    Or, you can also use Date Literals like

    WHERE CreatedDate > YESTERDAY

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos