Forum Discussion

BenKoth's avatar
BenKoth
Regular Visitor
7 years ago
Solved

DateTime in Azure Cosmos DB

I'm using an Azure Cosmos DB that is populated through the Azure Cosmos .NET SDK. According to the documentation, DateTimes should be stored as a serialize string in ISO_8601 format (https://docs.microsoft.com/en-us/azure/cosmos-db/working-with-dates). When I view my records in the azure portal or the azure storage explorer app, it appears like that is the case.

 

You can see my StartTime and EndTime properties as well as the TimeStamp are in the format "2019-07-15T16:24:51.392Z"

 

When I import the data to Power BI Desktop, the value comes out as some bizarre string/number. e.g. 

00636988010188048801

 

I thought that perhaps it was the # of milliseconds since 1/1/1970, but that is not the case. Does anyone know how to get the date time imported into Power BI correctly or how to convert that value to a datetime? Trying to just set the data type to any of the various DateTime options results in an error.

4 Replies