timestamp to date conversion problem in php

eslastamika

New Member
I have a timestamp like \[code\]1397105576\[/code\] and I need to convert it to data format. I used: \[code\]echo $today = date('20y-m-d H:m:s',"1397105576");\[/code\]I am getting:\[quote\] Severity: Warning
Message: date() expects parameter 2 to be long, object given\[/quote\]in the codeigniter framework.update: i found the answer the vaiable should be converted to longie \[code\]echo $today = date('20y-m-d H:m:s',intval("1397105576"));\[/code\]
 
Back
Top