Question: In this type of data: `user.status`, there is:

`UserStatusOffline(was_online=datetime.datetime(2020, 3, 6, 13, 33, 20, tzinfo=datetime.timezone.utc))`

How can i access to datetime and save it in a variable?

The datatype in the api of this is an Constructor

I'm sorry for my bad english xd

Answer: 
> 
> How can i access to datetime and save it in a variable?
> 
> 
> 

```
date = user.status.was_online

```

Then if you want work with this datetime object you should check out some [documentation](https://www.google.com/search?q=datetime%20python).
As the `date = user.status.was_online` returns the datetime object we can extract the variables of the object with the dot `.`.!

**Example**

```
dateobject = user.status.was_online
day = dateobject.day #returns Date
month = dateobject.month #return Month

```

Like wise you can explore all the methods/variables through inbuilt function `dir` in Python which let helps you many time ;)

Thank you