How to specify date and time in python?

后端 未结 4 1124
自闭症患者
自闭症患者 2021-02-06 23:12

Quite simple newbie question:

What is the object used in python to specify date (and time) in Python?

For instance, to create an object that holds a given date a

4条回答
  •  野趣味
    野趣味 (楼主)
    2021-02-06 23:46

    Look at the datetime module; there are datetime, date and timedelta class definitions.

提交回复
热议问题