Answers for "get date from timestamp php"

PHP
22

php get current date and time

$today = date("F j, Y, g:i a");   // October 30, 2019, 10:42 pm
$today = date("D M j G:i:s T Y"); // Wed Oct 30 22:42:18 UTC 2019
$today = date("Y-m-d H:i:s");     // 2019-10-30 22:42:18(MySQL DATETIME format)
Posted by: Guest on October-30-2019
0

only date in php

date('Y:m:d', strtotime($date))
Posted by: Guest on July-03-2020
2

php datetime to timestamp

$time = '2021-03-31 23:59:00';
strtotime($time);
Posted by: Guest on March-22-2021
1

date now php

date("Y-m-d H:i:s");
Posted by: Guest on October-21-2020
0

php datetime from timestamp

$ts = 1171502725;
$date = new DateTime("@$ts");
Posted by: Guest on May-11-2021
0

date now php

echo date('c');

// 2015-07-27T00:00:00+02:00
Posted by: Guest on October-21-2020

Code answers related to "get date from timestamp php"

Browse Popular Code Answers by Language