php unix timestamp to mysql datetime code example Example: php unix timestamp to date $currentTime = DateTime::createFromFormat( 'U', $timestamp );