Q:

Python program to print current hour, minute, second and microsecond

0

In the below example – we are implementing a python program to print current hour, minute, second and microsecond.

Steps:

  • Import the datetime class from datetime module
  • Create an object by calling the now() function of datetime class
  • Extract and print the current hour, minute, second and microsecond using the object of datetime.now().

All Answers

total answers (0)

Similar questions


need a help?


find thousands of online teachers now