Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

A new Data Days event is coming soon! This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. Don't miss out.

Reply
Krishanu
Helper I
Helper I

Datetimezone conversion behaves inconsistently

Hi,
I have text column in this format  - 2021-07-20T19:01:10.8986983Z
As you can see this is in UTC .  In Power BI desktop when I mark the datatype of this column as datetime, its converted into my local time. 
Now, When I publish this in service , this gets converted into UTC+3 (incidentally - my client is also in UTC+3) , this behavior is strange as Power BI service should be in UTC - This I have validated if I create a seprate column using  datetime.localnow()  and in desktop it shows my local time and in service it shows UTC.

Is the behavior of the text column in pbi service a bug or I am missing something here?
Thanks for your help.

1 ACCEPTED SOLUTION

Hi @Krishanu 

 

If your data is stored as text it will not change and keep what the value is stored as.


If you use datetime.localnow/datetimezone.localnow it will always use UTC because this is the time of all the Power BI Servers.





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!







Power BI Blog

View solution in original post

3 REPLIES 3
GilbertQ
Super User
Super User

Hi @Krishanu 

 

If you change it to a Text column, then use it will not change.


Likewise if you are not using the DateTime.LocalNow() it will keep the datetime column in the required format.





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!







Power BI Blog

Thanks @GilbertQ   for the response.
1. But I didn't understand where from it's getting UTC+3 in pbi service?

2. Is this a bug or this is by design - can I depend on this feature to get the datetime in client's timezone?
3. If this is expected behavior , why datetime.localnow/datetimezone.localnow gives result in UTC?


If you can reproduce this at your side - what could be the possible explanation?

Hi @Krishanu 

 

If your data is stored as text it will not change and keep what the value is stored as.


If you use datetime.localnow/datetimezone.localnow it will always use UTC because this is the time of all the Power BI Servers.





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!







Power BI Blog

Helpful resources

Announcements
May Power BI Update Carousel

Power BI Monthly Update - May 2026

Check out the May 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.