Forum Discussion

MarkTeviotdale's avatar
MarkTeviotdale
Frequent Visitor
1 year ago
Solved

TicksToDateTime Not Working

We are currently connected to Cosmos DB Databases with Table API using a SQL connector in PowerBI   Everything has been working just fine for a number of years now,  but overnight we ran into an is...
  • MarkTeviotdale's avatar
    MarkTeviotdale
    1 year ago

    Thanks Anonymous for your message. 

     

    We have a ticket in with Azure and the issue appears to be on the Azure Cosmos side, the current workaround at the moment is to add a ltrim example below: 

     

    add ltrim for leading zeros

    SELECT TicksToDateTime(StringToNumber(ltrim("00638435451214931790", "0")) - 621355968000070000)