SQL - Does anyone know to translate this query statement in Linq? I tried but I always get translation error

57 Views Asked by At

This is my query:

DECLARE @dto1 datetimeoffset;
SET @dto1 = '2023-03-24 00:00:00.0000000 -02:00';



SELECT JOB.JobId, JOB.NextExecutionUTC
FROM ATS.Job AS Job
WHERE JOB.StatusId = 1
AND JOB.LastRunState IS NULL
AND CONVERT(date, SWITCHOFFSET(JOB.NextExecutionUTC, DATEPART(tz, @dto1))) = CONVERT(DATE,@dto1)

I tried in Linq but always when I try to change the offset of the column that it is datetimeoffset it returns me a "translation" error.

0

There are 0 best solutions below