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.
Connecting Power BI Semantic Models To Data Sources Automatically With
Binding Hints
-
Did you know that you can configure your Power BI semantic model so that it
automatically binds to a data source connection when you publish? To
illustrate...
3 weeks ago
No comments:
Post a Comment