How can I select the timescripts of my documents in Date readable format? I want to do something like this:
SELECT CAST(C._ts AS DATE) FROM C
Specific to Cosmos DB SQL Query only please.
Functions announced in October 2020 https://devblogs.microsoft.com/cosmosdb/new-date-and-time-system-functions/ can assist with this (taking care to convert seconds to milliseconds)
SELECT TimestampToDateTime(C._ts*1000) as DateTime FROM C
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With