I'm trying to query using a where clause such as this: WHERE Today = a specific date .
This is what I have right now:
DateAdd(day, 0, GetDate()) = '2018-02-12' (because it was 2/12 when I posted/tested this)
Salesforce Stack Exchange is a question and answer site for Salesforce administrators, implementation experts, developers and anybody in-between. It only takes a minute to sign up.Sign up to join this community
The CAST function in SQL converts data from one data type to another. By casting the GetDate() you're converting it to a string and comparing with a string in format of
You can do something like this:
WHERE cast(GetDate() As Date) = '2018-02-12'