logo-MindMajix
PostPythonPython
A
Anand Sahu

Posted on 22nd June 2024|81 views

0
votes

How to get the current time in Python

What is the module/method used to get the current time?

1 answers
Answers
P
Hari Krishna

Posted on 22nd June 2024| views

Use Below Code:

>>> Import Datetime
>>> Datetime.datetime.now()
Datetime.datetime(2020, 2, 18, 21, 20, 48, 62458)

>>> Print(datetime.datetime.now())
2020-02-18 21:20:48.624580

 

Write your answer

STILL GOT QUERIES?

Get a Live FREE Demo

  • Explore the trending and niche courses and learning maps
  • Learn about tuition fee, payment plans, and scholarships
  • Get access to webinars and self-paced learning videos
Name
Course *
Email *
Phone Number