Search code examples
sqlsalesforce

Sales Force SQL string to date convertion


I have written following conversion that works okey in T-SQL :

SELECT * FROM thetable
WHERE convert(datetime, SomeDate, 103) >= '2020-10-01 00:00:00.000

When downloading data from Sales Force using Azure Data Factory, I pasted the same command and it has returned syntax error. Is there another SQL dialect that Sales Force recognizes ? If so, how can I rewrite varchar(string) to date conversion to use it in WHERE statement?


Solution

  • Solved it by removing conversion and changing date format:

    SELECT * FROM thetable
    WHERE SomeDate >= '2020-10-01T00:00:00Z'