# import datetime class from datetime module from datetime import datetime # get current date datetime_object = datetime.now() print(datetime_object) print('Type :- ',type(datetime_object))