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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Remahl_M
New Member

Power BI unable to read time portion of MongoDB date format

I am currently using Version: 2.61.5192.601 64-bit (August 2018). We are using the ODBC connector to connect to a MongoDB deployment.

 

I can confirm that date with time is saved correctly in the MongoDB database:

 

MongoDB_time_example.png

 

 

 

 

 

However in Power BI/ Query Editor, all the time values are defaulting to "00:00:00" even when changing type to Date/Time.

If we try to change type to just "Time" we get an 'Error'.

 

QueryEditor_changetype_fail.png

 

 

 

 

 

 

 

 

 

 

 

Can't seem to find a way to get around this via Advanced Editor or Query Editor. A search for solutions showed one thread from 2017 with a solution/workaround that I have tried and does not work: Link here.

 

I requested to my colleague if we could create a seperate column with just time data in MongoDB but I was advised that there is no "Time" data type. MongoDB saves both Date and Time in the combined "Date" data type. 

 

So it looks like the fix needs to come from the Power BI side. Possibly the Advanced Editor as the time data is already lost by the time I can work with it in Query Editor.

 

Does anyone have advice or has experienced the same issue when using MongoDB as a data source?

2 REPLIES 2
Stachu
Community Champion
Community Champion

I'd try splitting the column into separate date and time BEFORE changing the type. Then change appropiately for individual columns



Did I answer your question? Mark my post as a solution!
Thank you for the kudos 🙂

Thank you for your quick reply Stachu. Unfortunately your idea didn't work.

 

Split_column_fail.png

 

 

 

 

 

 

 

 

 

 

 

 

 

 

The time still appears as "00:00:00". 

 

I went back into the steps to just after 'Navigation', usually the 2nd step. The "occurredon" column only showed a Date and when I split it out, what would have been the time column was "null".

 

 

***** 

 

EDIT: I started a brand new Power BI workbook and re-connected to just that specific table on MongoDB. I wanted to eliminate the possibility it might be just a one-off misconnection. But unfortuantely I still had the same problem. As far as PowerBI can tell, there is no timestamp accompanying that date value. 

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors