Answers for "UNIX_TIMESTAMP to time"

PHP
1

php unix timestamp to date

$currentTime = DateTime::createFromFormat( 'U', $timestamp );
Posted by: Guest on November-05-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