I want to generate a timestamp only in hour and minutes format, like this:
154h 27m
Please check my logic below
planned_downtime = timedelta(hours=random.randrange(150))
However, the result is coming in seconds. To convert it to above mentioned format, I applied this:
planned_downtime.strftime("%H %M")
But I'm getting errors. How can I convert this randomly generated time in above format?