Sample Header Ad - 728x90

Query MST instead of UTC for timestamps

0 votes
1 answer
1069 views
on SQL Server, i'm trying to query all of last months data based off of the time stamp, however, all those timestamps are in UTC and i need them to be in MST (the reason is mainly for the end dates) So far this is what I have: Select Vehicle.Timestamp WHERE Vehicle.Timestamp >= DATEADD(mm,DATEDIFF(mm,32,GETUTCDATE()),0) AND Vehicle.Timestamp < DATEADD(mm,DATEDIFF(mm,0,GETUTCDATE()),0) order by Vehicle.Timestamp i'm not entirely sure which way to move forward. I've seen the use of switchoffset however, not sure the best way to apply it.
Asked by scaborski (3 rep)
Feb 2, 2015, 07:55 PM
Last activity: Feb 2, 2015, 10:40 PM