I'm trying to store an ISO formatted DateTime in my Azure Table Storage. But every time I try, it results in this String format:
This is a summary of the effective code I'm running:
import jsons
from azure.functions import Out
def main(parameterTableOutputJSON: Out[str]):
row = {'ReadOn': '2021-04-28T09:35:26.123456Z'}
parameterTableOutputJSON.set(jsons.dumps(row))
Of course my real code also has the PartitionKey and RowKey columns, but I can't show those here.
How can I insert the DateTime in the Azure Table Storage like this: 2021-04-28T09:35:26.123456Z
Instead of this: 04/28/2021 09:35:26
The Azure Table Storage docs tell me it supports ISO formatted date times...
set
function. The JSON String that goes into this function is the payload that gets written to Table Storage. – Stefan Rang