How to get today date in Python

1 Answer

0 votes
import datetime
 
today = datetime.date.today()     
print(today)

print(today.ctime())



'''
run:

2019-06-05
Wed Jun  5 00:00:00 2019

'''

 



answered Jun 5, 2019 by avibootz

Related questions

1 answer 294 views
1 answer 306 views
1 answer 307 views
1 answer 377 views
1 answer 253 views
1 answer 249 views
1 answer 313 views
...