http://www.zukatsu.tk/
Kategori : Python28 Februari 2017 16:08:52

Python Get Day Of Week From Date

Use weekday() (docs)


>>> import datetime
>>> datetime.datetime.today()
datetime.datetime(2012, 3, 23, 23, 24, 55, 173504)
>>> datetime.datetime.today().weekday()
4

Source : Stackoverflow

Share : Share Facebook Share Twitter
Kategori : Python28 Februari 2017 16:08:52

zukatsu
©2011