Python Dates/Times
   1 min read

DateTime Type

Example:

import datetime #use the datetime library

timeStamp = datetime.datetime.now().strftime("%I:%M%p on %B %d, %Y")
print("The time now is " + timeStamp + ".")

The time now is 12:07PM on April 09, 2021.

What's on this Page