Convert Timestamp to datetime in Python

To convert Timestamp to datetime object in Python, you can use the fromtimestamp() function from the datetime module of Python.

Here's an example to demonstrate the same:

import datetime

timestamp = 1615457713
date_obj = datetime.datetime.fromtimestamp(timestamp)
print(date_obj)
print(type(date_obj))

The output of the above code is as follows:

2023-09-23 16:00:14