Skip to content
Advertisement

Tag: iso8601

Generate list of random datetimes in ISO8601 format in Python

I want to generate a list of length n with random datetime strings in Python within a range. I had asked a similar question before, but I did not use the correct format for datetime.What is the best way to achieve this? Answer Modifying the answer here for your format: https://stackoverflow.com/a/553448/7942856 Outputs: Then if you want the text ISO format,

Advertisement