I have a timestamp like `1397105576` and I need to convert it to data format. I used: 

```
echo $today = date('20y-m-d H:m:s',"1397105576");

```

I am getting:

> 
> Severity: Warning  
> 
>  Message: date() expects parameter 2 to be long, object given
> 
> 
> 

in the codeigniter framework.

update:
 i found the answer 

the vaiable should be converted to long
ie 

```
echo $today = date('20y-m-d H:m:s',intval("1397105576"));

```