Published on InterSystems Developer Community (https://community.intersystems.com)

Home > Convert UTC to local time via SQL

Question
Nicholas Chimera · Jun 21, 2018

Convert UTC to local time via SQL

Hello,

I’m running  a query to drive a report.

 

I have a persistent class that includes this:

Property CreationTime As %TimeStamp [ InitialExpression = {$ZDateTime($ZTimeStamp, 3, 1, 2)} ];

 

So the above populates the column with UTC time.

 

Is there a way to convert to local time inside the SQL query?

 

 

Thanks!

#Caché

Source URL:https://community.intersystems.com/post/convert-utc-local-time-sql