ajax - Convert unix timestamp to normal Date in Json -
i using laravel 5.0. getting data controller json. having value this.
{"timstamp_date":"1434360957"},
i need convert unix timestamp value normal date (15-06-2015)
or (15-march-2015)
.
i have used date(timstamp_date)
showing current time only. not timstamp date
you use:
date("d-m-y h:i:s", 1434360957);
edit try;
var datetime = new date(1434360957*1000); var formatted = datetime.togmtstring();
Comments
Post a Comment