0
python
How to write a code to print yr-month-date (Todays date n time) hrs: mts .
3 Answers
+ 1
Thanks Peter
0
will cover many aspects of dates in py you may seek https://www.w3schools.com/JUMP_LINK__&&__python__&&__JUMP_LINK/python_datetime.asp
- 1
import datetime
x = datetime.datetime.now()
print(x)
import datetime
x = datetime.datetime.now()
print(x.year)
print(x.strftime("%A"))
see a pattern yet where its all imported from? lol