简体   繁体   English

在Grocery CRUD中更改整数时间为日期格式

[英]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. 在给定示例的链接中查看客户操作显示了有关客户的详细信息,现在在这些详细信息中,我有一个字段时间以int格式显示。

I need to change that int(1443198514) to proper PHP date format(25 Sep 2015 21:58:34). 我需要将int(1443198514)更改为正确的PHP日期格式(2015年9月25日21:58:34)。

How to do that. 怎么做。 Any relevant help will be much appreciated. 任何相关的帮助将不胜感激。

Unix timestamp to date time Unix时间戳到日期时间

$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);

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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