How to Solve NameError: name 'dateutil' is not defined

Solution: Import the 'dateutil' module

# Add the following line to the top of your code
import dateutil

 

For more information:
Python dateutil