Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
Hi team,
I have one query regarding the date-time value in power bi.
My data source is SharePoint and the date is "18-12-2021 16:03" but when importing the data in power bi then it gets changed as "2021-12-18 10:33:22 AM". time not matched with the original time.
Please guide.
Thanks in advance.
Solved! Go to Solution.
Hi @vijay22kar ,
This is caused by the different time zones in Power BI and SharePoint Online. You can change the time zone or change the API version to get the correct datetime.
Here are the steps of my test.
1. The sample data in SharePoint Online is as follows.
2. After loading columns using SharePoint online list connector, the datetime column changes and adds 8 hours to the original time.
3. Fix the datetime column.
a. I found that by default I was using API version 15, then changed it to 14 and the imported datetime column was correct.
b. Another way to fix the datetime column is to convert the time zone. First find your site's time zone under SharePoint's Site Settings -> Regional Settings -> Time zone.
Then change the datetime column type in Power BI to Date/Time/Timezone, add a custom column to change the time zone to the same as in SharePoint (in my example is: -8).
= DateTimeZone.RemoveZone(
DateTimeZone.SwitchZone( [datetime], -8 )
)
If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @vijay22kar ,
This is caused by the different time zones in Power BI and SharePoint Online. You can change the time zone or change the API version to get the correct datetime.
Here are the steps of my test.
1. The sample data in SharePoint Online is as follows.
2. After loading columns using SharePoint online list connector, the datetime column changes and adds 8 hours to the original time.
3. Fix the datetime column.
a. I found that by default I was using API version 15, then changed it to 14 and the imported datetime column was correct.
b. Another way to fix the datetime column is to convert the time zone. First find your site's time zone under SharePoint's Site Settings -> Regional Settings -> Time zone.
Then change the datetime column type in Power BI to Date/Time/Timezone, add a custom column to change the time zone to the same as in SharePoint (in my example is: -8).
= DateTimeZone.RemoveZone(
DateTimeZone.SwitchZone( [datetime], -8 )
)
If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
I tried to replicate your issue but with no luck. PowerBI returns the correct date.
You should check the regional settings on PowerBI and also on your PC
User | Count |
---|---|
124 | |
108 | |
99 | |
62 | |
62 |
User | Count |
---|---|
137 | |
115 | |
102 | |
71 | |
61 |