Answer the question
In order to leave comments, you need to log in
How to use Python datetime?
Good afternoon everyone. I wrote a Python script that parses the date in the following format:
1) Today
2) Yesterday
3) June
4 4) June 5,
etc.
How can I display on the screen not the words "today or yesterday", but in the format DD.MM.YYYY?
For yesterday it was 06/05/2020
, etc.
Answer the question
In order to leave comments, you need to log in
today = datetime.datetime.today()
data_now=today.strftime("%Y-%m-%d)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question