Closed StickNitro closed 5 years ago
This sounds like an issue with the underlying CosmosDB SDK, not with Cosmonaut. You can easily resolve this by specifying a converter. Here is a stackoverlfow question with relevant answers: https://stackoverflow.com/questions/18635599/specifying-a-custom-datetime-format-when-serializing-with-json-net
Let me know if that helped.
I have a CosmosDB collection where I am storing ISO formatted dates as strings, for example, I have saved a document with a start value of
2018-07-26T09:00:00Z
and when I look in the Data Explorer I can see the value saved correctly.I am using Cosmonaut to access my CosmosDB which exposes the DocumentClient and I am using CreateDocumentQuery to access my document but when the document gets returned from CosmosDB the start value is converted to a DateTime string
07/26/2018 09:00:00
The above is my query, has anyone else encountered this and if so how did they resolve this problem, my expectation is that my string value should be returned as is and not interpreted as a
DateTime
which seems to be what is happening