Forum Discussion
Trying to modify "Date.AddDays(Date.From(DateTime.FixedLocalNow()),0)" to fixed time zone
I am having an issue with this particular Power Query line:
= Date.AddDays(Date.From(DateTime.FixedLocalNow()),0)
The issue happens when my PowerBI report gets refreshed after UTC time zone.
I am located in PST time zone, and whenever I publish my PBI report to PBI Service after UTC's time is 12 AM (next day),
date becomes UTC's today's date.
Is there way to modify this line to fix to PST time zone minus 1 day in date format like 11/15/2022?
Thank you
1 Reply
- AnonymousNot applicable
Hi JustinDoh1 - it sounds like you tenant settings are conflicting with local requirements, so can I suggest that you use the DateTimeZone.FixedUtcNow - PowerQuery M | Microsoft Learn and DateTimeZone.SwitchZone - PowerQuery M | Microsoft Learn functions in the query. Base the time on UTC datetime regardless of tenant settings and then convert to PST.