Answers for "pyhton date now"

14

python datetime now

import datetime
print(datetime.datetime.now()) #datetime.datetime.now() is the syntax
Posted by: Guest on March-29-2020
0

py current date

from datetime import datetime
datetime.today().strftime('%Y-%m-%d')
'2021-01-26'
Posted by: Guest on July-05-2021
14

python datetime now

import datetime
print(datetime.datetime.now()) #datetime.datetime.now() is the syntax
Posted by: Guest on March-29-2020
0

py current date

from datetime import datetime
datetime.today().strftime('%Y-%m-%d')
'2021-01-26'
Posted by: Guest on July-05-2021

Python Answers by Framework

Browse Popular Code Answers by Language