Answers for "from_unixtime(unix_timestamp())"

PHP
2

mysql unix timestamp to date

SELECT FROM_UNIXTIME(1447430881); 
	# 2015-11-13 10:08:01
SELECT FROM_UNIXTIME(1632406597); 
	# 2021-09-23 16:16:37
SELECT FROM_UNIXTIME(1447430881,'%Y %D %M %h:%i:%s %x'); 
	# 2015 13th November 10:08:01 2015
Posted by: Guest on September-23-2021
1

php datetime object get unix timestamp

$date = new DateTime();
echo $date->getTimestamp();
Posted by: Guest on April-01-2020
1

from datetime to unix timestamp

import time
import datetime
d = datetime.date(2015,1,5)

unixtime = time.mktime(d.timetuple())
unixtime
Posted by: Guest on May-06-2021

Browse Popular Code Answers by Language