format_timedelta¶
- format_timedelta(td: timedelta, dp: int = 0) str[source]¶
Convert a timedelta to a formatted string representation.
Convert a Python timedelta object into a string representation, including microseconds to the requested precision.
- Args
td: A timedelta object. dp: A number of decimal places for microseconds (0=do not show).
The number should be natural number with 0.
- Returns:
Formatted string representation of timedelta.