Thanks to one of my colleagues add this to your SELECT statement and it will convert a CRM date time field to local time and consider daylight saving:
DATEADD(HOUR,CAST(left(right(CAST(SYSDATETIMEOFFSET()as nvarchar(50)), 5),2) as INT),new_CRMDateTimeField)
No comments:
Post a Comment