Step-by-step guide

This is how to do it in Macro and Python, respectively:

year = 2016
month = 8
day = 9
d = date(10000*year + 100*month + day)
from datetime import datetime
year = 2016
month = 8
day = 9
d = datetime(year, month, day)