go to post Daniel Buxton · Oct 26, 2020 Hey All, I will close this post. Ended tweaking my application so instead of using a webservice to initially get the time and date in epoch, I used select now(). So my application now works as per below, it automatically deals with DST and epoch conversion to the required datetime format. var1 = select now() select COUNT ("Arrival Time") FROM dbo.table where "Arrival Time" < var1
go to post Daniel Buxton · Oct 21, 2020 oh yeah getting closer. It looks like the webservice I am using is actually sending me UTC Time and I need to convert to my timezone select DATEADD(ms, CONVERT(string,LEFT(1603274296000+39600000, 20)), '1970-01-01 00:00:00') adds 11 hours and shows my current time of 2020-10-21 20:58:16