How to convert string value like "4w 2d.." to timedelta?
How to convert string value like "4w 2d.." to timedelta? Question: I have incoming string data in format like "4w 2d 5h" (weeks(w), days(d), hours(h), minutes(m)), some it can have different number of parameters (from 1 to 4, e.g "1w", "2w 5h", "3w 1d 5h 3m", etc). I need to convert it to timedelta (datetime) …