-
-
Notifications
You must be signed in to change notification settings - Fork 413
Closed
Description
Hello beautiful people!
I have for hours and hours trying to figure out how to use pendulum in a case which is super hard. I have a text that returns
01-06-08-45
which means:
Closing in : 1 day, 6 hours, 8 minutes and 45 seconds.
and I want to be able to convert this into pendulum.format/parse (so I have something like 2022-09-01 12:00:00)
I have currently done something like this:
t = '01-06-08-45'
test = pendulum.duration(days=float(t.split('-')[0]), hours=float(t.split('-')[1]), minutes=float(t.split('-')[2]), seconds=float(t.split('-')[3]))
which returns 1 day 6 hours 8 minutes 45 seconds but my question is how can I convert this into a format of e.g. 2022-09-01 12:00:00 instead? Is that possible using Pendulum?
Metadata
Metadata
Assignees
Labels
No labels