I have data I need to query based on local time, but the timestamp in the table is central time because our server is in central time. We have devices all over the country so local
time varies widely.
So we created a field called CentralTimeOffset that holds the value of + or - the number of hours the record is from central time zone. So for example if the local time for the
record is Mountain then CentralTimeOffset field contains -1, if the local time for the record is Eastern then the CentralTimeOffset contains 1. I want to use DateAdd to convert central time to the appropriate local time for each record.
The query I run to get the data is date range based, and I need to make sure my data is converted to the local time zone first so that the StartDate and EndDate are comparing against
local not central. Here is what I have in the where field, I just need to confirm it’s doing what I think it’s doing:
View Complete Post