I am using this in my Python Script
datetime.datetime.utcnow().isoformat()
in order to print timestamps every 5 seconds (and also power values). I want to later use the timestamps and power values to create graphs in Power BI. The problem is that sometimes the timestamp printed is like this (see error too)
DataFormat.Error: The provided input could not be analyzed as a DateTime value.
Details
2019-6-16T20:58:5.488
The problem is that the seconds are 5.488 and not 05.488
I have not found a solution in Power BI, so I thought maybe there is a way to actually print it like this in the Python script from the beginning
2019-6-16T20:58:05.488
Any ideas?