A Date With the Datetime Module in Python | Part 1

How to get current date with month, year and day using Python

Sahil Fruitwala
Level Up Coding
Published in
2 min readOct 25, 2022

--

We can extract current date using 2 classes.

  1. Using date class
from datetime import datetoday = date.today()
  1. Using datetime class

--

--

I am a Software Developer who loves to help, teach and explore. Check out my blog publication here: https://sahilfruitwala.com