close

How to get the Current Date in Python

Hello guys. How are you all? I hope you all fine. In this tutorial we will learn about How to get the Difference Between Two Lists in Python. so without wasting time lets learn about of this.

How to get the Current Date in Python

  1. Get the Current Date in Python

    to get the Current Date in Python just Use datetime.By using datetime you can get the current date in python. So without wasting time lets learn about of this by given below example: from datetime import datetime print(datetime.today()) Output :
    2022-01-16 15:18:01.459278

  2. How to get the Current Date in Python

    to get the Current Date in Python just Use datetime.By using datetime you can get the current date in python. So without wasting time lets learn about of this by given below example: from datetime import datetime print(datetime.today().strftime('%A, %B %d, %Y %H:%M:%S')) Output : Sunday, January 16, 2022 15:19:26

  3. python today’s date

    To get the Current Date in Python just Use datetime.By using datetime you can get the current date in python. So without wasting time lets learn about of this by given below example: from datetime import datetime print(datetime.today().strftime('%A, %B %d, %Y %H:%M:%S')) Output : Sunday, January 16, 2022 15:19:26

Method 1: Use datetime

By using datetime you can get the current date in python. So without wasting time lets learn about of this by given below example:

from datetime import datetime
print(datetime.today())

Output :

2022-01-16 15:18:01.459278

Method 2: Use datetime

By using datetime you can get the current date in python. So without wasting time lets learn about of this by given below example:

from datetime import datetime
print(datetime.today().strftime('%A, %B %d, %Y %H:%M:%S'))

Output :

Sunday, January 16, 2022 15:19:26

Conclusion

It’s all About this Tutorial. Hope all methods helped you a lot. Comment below Your thoughts and your queries. Also, Comment below which method worked for you?

Also, Read

Leave a Comment