Top "Python-dateutil" questions

The dateutil module provides powerful extensions to the standard datetime module, available as an extension module which is compatible with Python 2.3+.

dateutil.relativedelta - How to get duration in days?

I wish to get the total duration of a relativedelta in terms of days. Expected: dateutil.timedelta(1 month, 24 days) -&…

python python-dateutil relativedelta
Import Error: "No module named 'dateutil' "

I installed Python-Dateutil package, but when i import it in my script , it's throwing error: import dateutil ImportError: No module …

python matplotlib python-dateutil
Using datetime.timedelta to add years

I am doing some time calculations in Python. Goal: Part of this is trying to : Given a date, add time …

python datetime timedelta python-dateutil
dateutil.parser.parse() and lost timezone information

I am trying to dateutil.parser.parse() to parse the default str(datetime.datetime.now()) output using timezone-aware datetimes. However, …

python django python-2.7 datetime python-dateutil
Parsing a date in python without using a default

I'm using python's dateutil.parser tool to parse some dates I'm getting from a third party feed. It allows specifying …

python python-dateutil
Is this the right way to set a timezone with dateutil?

>>> import dateutil.parser, dateutil.tz as tz >>> dateutil.parser.parse('2017-08-09 10:45 am').…

python datetime timezone python-dateutil
dateutil.parser.parse() gives error "initial_value must be unicode or None, not str" on Windows platform

I'm sure there's a really simple solution to this, but I'm still fairly new to Python. I'm trying to use …

python python-dateutil
How to convert a timedelta to a string and back again

Dateutil's timedelta object appears to have a custom __str__ method: In [1]: from datetime import timedelta In [2]: td = timedelta(hours=2) In [3]: …

python datetime python-dateutil
Trouble in parsing date using dateutil

I am using python-dateutil for parsing a date from a string: import dateutil.parser print dateutil.parser.parse('some null …

python python-2.7 python-dateutil
Dateutil package: absolute difference in seconds between two dates

I use Python and 'dateutil' package. I have two dates 'date1' and 'date2' that are parsed from some …

python date python-dateutil