Python Dates and Times in Python Dates and Times Manipulating Time Already

.a{fill-rule:evenodd;}techdegree seal-36
UX Design Techdegree Graduate 28,226 Points method return type.


I noticed whenever was called or any variable storing the datetime was accessed in the REPL in the video, the value returned was something like datetime.datetime(something).

What type of return type is this?

2 Answers

Steven Parker
Steven Parker
204,010 Points

That's a datetime object. The REPL is just making it into something readable for you when you use it by itself.

For more details see the Python documentation pages.

jhon white
jhon white
19,639 Points
from datetime import datetime

# datetime object containing current date and time
now =
#You can use "type" function to find out. 
print("now =", type(now))

Good luck :)