0

I'm trying to get UTC Date time to Date in power bi, i have tried in following way but it wont work,

UTC Date : DateTime.ToText(DateTimeZone.UtcNow(),"yyyyMMdd") --> Throwing Error

Local Date: DateTime.ToText(DateTime.LocalNow(), "yyyyMMdd") --> 20200508

The problem here is Local Date i can able to format but UTC Date i'm not able to format why?

KARTHIKEYAN.A
  • 18,210
  • 6
  • 124
  • 133

1 Answers1

0

After tried many time i got one way to work it

DateTime.ToText(Date.From(DateTimeZone.FixedUtcNow()),"yyyyMMdd") --> 20200508
KARTHIKEYAN.A
  • 18,210
  • 6
  • 124
  • 133