The CosmosDB database I am using suggests I store DateTime in a string.
Working with Dates in Azure Cosmos DB
So I am trying to do this:
string DateAndTime = DateTime.Now.ToString()
but it's not giving me the correct format. Is there a method to do this and to convert it to this exact format: YYYY-MM-DDThh:mm:ss.sssZ ?