📜  phyton 日期时间比较 - Python 代码示例

📅  最后修改于: 2022-03-11 14:47:23.535000             🧑  作者: Mango

代码示例1
# date in yyyy/mm/dd format
d1 = datetime.datetime(2018, 5, 3)
d2 = datetime.datetime(2018, 6, 1)
  
# Comparing the dates will return
# either True or False
print("d1 is greater than d2 : ", d1 > d2)