python中datetime的用法#!/usr/bin/envpython3#-*-coding:utf-8-*-importdatetimedates=datetime.datetime(2020,10,31,12,13)dates=datetime.now()print(dates.year)