Is it possible to create a new item and set a field to the current time - as set on the server, in Cosmos DB?
I'm looking for something similar to INSERT INTO t VALUES (NOW());
in SQL.
I'd like to avoid asserting that the client time is correctly synced.
Update: To clarify, I don't mean GetCurrentDateTime()
.
I want to set the value of a custom field to the current server time.
e.g. {"started": "<NOW>"}
Can anyone share the code (in C# or Python, for example) that can be used?