from datetime.strptime get year python code example
Example 1: how to get date in numbers using python
from datetime import datetime
shortDate = datetime.today().strftime('%Y-%m-%d')
Example 2: HOW TO CREATE A DATETIME LIST QUICK
import pandas as pd
from datetime import datetime
datelist = pd.date_range(datetime.today(), periods=100).tolist()