简体   繁体   中英

Change the integer time to date format in Grocery CRUD

The view customer action in the example given link shows the details regarding the customer.Now among those details I have a field time which shows in int format.

I need to change that int(1443198514) to proper PHP date format(25 Sep 2015 21:58:34).

How to do that. Any relevant help will be much appreciated.

Unix timestamp to date time

$timestamp=1333699439;
$today = date("F j, Y, g:i a",$timestamp);                 // March 10, 2001, 5:16 pm
$today = date("m.d.y",$timestamp);                         // 03.10.01
$today = date("j, n, Y",$timestamp);                       // 10, 3, 2001
$today = date("Ymd",$timestamp);                           // 20010310
$today = date('h-i-s, j-m-y, it is w Day',$timestamp);     // 05-16-18, 10-03-01, 1631 1618 6 Satpm01
$today = date("Y-m-d\TH:i:s\Z", $timestamp);

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM