To convert a UTC time to local time, we first find out the difference between the UTC and local time by getting the current UTC time and local time.
DECLARE @UTCtoLocalTime AS INT
Set @UTCtoLocalTime = DATEDIFF(hour, GETUTCDATE(), GETDATE())
Then we just need to add the difference back to the UTC time to get the local time.
DateAdd(hour, @UTCtoLocalTime, [UTC TIME])
The benifit of this approach is that the US daylight saving is considered.
Power BI Copilot, AI Instructions And DAX Query Templates
-
At the end of my last post I showed how, if you put the definition of a
measure in the AI Instructions of your Power BI semantic model, Copilot can
use it ...
1 day ago
No comments:
Post a Comment