In my php app, I do a db query that returns a bunch of documents from mongodb. As i'm looping through each document, i'm trying to extract the timestamp and display it as a Y-M-d h:i:s format. But I'm not even sure at this point how to extract it.

I'm testing with this code: 

```
    var_dump($value->playbook_run_date);

```

That outputs/ returns this: 

```
object(MongoDB\BSON\UTCDateTime)#9 (1) {
  ["milliseconds"]=>
  string(13) "1486277081000"
}

```

I've tried to change the code to look like this: 

```
  var_dump($value->playbook_run_date['milliseconds']);

```

But that returns the error: 

> 
> Cannot use object of type MongoDB\BSON\UTCDateTime as array
> 
> 
> 

I've been googling around for that error and have tried a few examples including: 

```
var_dump($value->playbook_run_date->{'milliseconds'});
var_dump($value->playbook_run_date->1->{'milliseconds'});
var_dump($value->playbook_run_date[1]->{'milliseconds'});

```

But I can't seem to figure it out.
Any help would be appreciated.