Question
· Sep 17, 2019

DATEPART local date

Hi,

I'm trying to run a query from Management Portal, to get a count of messages in 10 minute periods for analysis. I'm using DATEPART to pull the hour and minute portions, but the value being returned is the UTC value, rather than the actual value.

i.e.

TimeCreated = '2019-09-10 23:01:45'

DATEPART(hh, TimeCreated)   is returning 22 rather than 23. 

 

How do i force DATEPART to return the correct display value?

Discussion (5)1
Log in or sign up to continue