Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! It's time to submit your entry. Live now!
how can I dynamically get the offset between utc and client.
The follwoing does not work
DateTimeZone.UtcNow()-DateTimeZone.LocalNow())
I want this to result in -4 as I am in EST.
Thank you in advance.
Solved! Go to Solution.
Some areas are offset by hours and minutes, hence the second line:
= DateTimeZone.ZoneHours(DateTimeZone.FixedLocalNow())
+ DateTimeZone.ZoneMinutes(DateTimeZone.FixedLocalNow()) / 60
@ronrsnfld many thanks, this is simply awesome.
Some areas are offset by hours and minutes, hence the second line:
= DateTimeZone.ZoneHours(DateTimeZone.FixedLocalNow())
+ DateTimeZone.ZoneMinutes(DateTimeZone.FixedLocalNow()) / 60
| User | Count |
|---|---|
| 19 | |
| 13 | |
| 9 | |
| 8 | |
| 7 |