Articles

Program to print today's date in Python

Program to print today's date in Python


In the python programming article, we are going to learn

  • program to print today's date in python

Program to print today's date in Python

The program is as follows:

 

# Owner : TutorialsInhand Author : Devjeet Roy

from datetime import date

date_today = date.today()
print("Today's date:", date_today)

The output of the program is as follows:

 

PS C:\Users\DEVJEET\Desktop\tutorialsInHand> python code.py
Today's date: 2021-02-09

Few important tips about the program

1. The datetime library has been used in the program.

2. The today() method of the date returns today's date.

 

print-today's-date-in-python

 


Basic Python Programs

Would you like to see your article here on tutorialsinhand. Join Write4Us program by tutorialsinhand.com

About the Author
Devjeet Roy
Full Stack Web Developer & Data Science Enthusiast
Page Views :    Published Date : Oct 13,2022  
Please Share this page

Related Articles

Like every other website we use cookies. By using our site you acknowledge that you have read and understand our Cookie Policy, Privacy Policy, and our Terms of Service. Learn more Got it!