I think you are saying the correct way is changing Ignitions translators datatype Datetime to a Datetime2.
I don't have permission yet to change that.
If you do that, then UTC time would still be UTC time though correct?
I tried to cast the UTC time as a datetime2. I am sure the unseen part changed.
I still need to do converting though to use a where clause on the UTC value though I think.
I am missing something that is not obvious to me.
Here is my where clause I want to use, but am stuck on currently.
Where
StartTimeUTC between
case when DATEPART(HOUR, GETDATE()) < 7 then DATEADD(hh,-17,DATEADD(dd,DATEDIFF(dd,0,GETDATE()-0),0))
when DATEPART(HOUR, GETDATE()) >= 19 then DATEADD(hh, 7,DATEADD(dd,DATEDIFF(dd,0,GETDATE()-0),0))
else DATEADD(hh, -5,DATEADD(dd,DATEDIFF(dd,0,GETDATE()-0),0)) end
and
case when DATEPART(HOUR, GETDATE()) < 7 then DATEADD(hh, -5,DATEADD(dd,DATEDIFF(dd,0,GETDATE()-0),0))
when DATEPART(HOUR, GETDATE()) >= 19 then DATEADD(hh, 19,DATEADD(dd,DATEDIFF(dd,0,GETDATE()-0),0))
else DATEADD(hh, 7,DATEADD(dd,DATEDIFF(dd,0,GETDATE()-0),0)) end