Skip to main content
Mitratech Success Center

Client Support Center

Need help? Click a product group below to select your application and get access to knowledge articles, webinars, training content, and release notes or to contact our support team.

Authorized users - log in to create a ticket, view tickets status and check your success plan details.

 

Timezone conversion

/*
This is a sample script to demonstrate timezone conversion for date fields in CMO DWH

This script is intended to be used with SQL 2016+ and it utilises the 'AT TIME ZONE' funtion
*/

select 
    de.EventNumber,
    de.EventDateTime [EventDateTime in UTC],
    de.EventDateTime at time zone 'utc' at time zone 'Central America Standard Time' [CST],
    de.EventDateTime at time zone 'utc' at time zone 'GMT Standard Time' [GMT],
    de.EventDateTime at time zone 'utc' at time zone 'AUS Eastern Standard Time' [AEST]
from DimEvent de
order by 1 desc

  • Was this article helpful?