Convert timestamp to readable date/time in PHP Last Updated : 11 Jul, 2025 Comments Improve Suggest changes 8 Likes Like Report Problem: Convert timestamp to readable date/time in PHP Solution: This can be achieved with the help of date() function, which is an inbuilt function in PHP can be used to format the timestamp given by time() function. This function returns a string formatted according to the given format string using the given integer timestamp or the current time if no timestamp is given. Example 1: php <?php echo date('m/d/Y H:i:s', 1541843467); ?> Output: 11/10/2018 09:51:07 Example 2: php <?php echo date('m/d/Y H:i:s', time()); ?> Output: Current Time in formatted form Reference: https://www.php.net/manual/en/function.date.php PHP is a server-side scripting language designed specifically for web development. You can learn PHP from the ground up by following this PHP Tutorial and PHP Examples. Comment S sarthak_ishu11 Follow 8 Improve S sarthak_ishu11 Follow 8 Improve Article Tags : Technical Scripter Web Technologies PHP Technical Scripter 2018 PHP-date-time date-time-program +2 More Explore PHP Tutorial 8 min read BasicsPHP Syntax 4 min read PHP Variables 5 min read PHP | Functions 8 min read PHP Loops 4 min read ArrayPHP Arrays 5 min read PHP Associative Arrays 4 min read Multidimensional arrays in PHP 5 min read Sorting Arrays in PHP 4 min read OOPs & InterfacesPHP Classes 2 min read PHP | Constructors and Destructors 5 min read PHP Access Modifiers 4 min read Multiple Inheritance in PHP 4 min read MySQL DatabasePHP | MySQL Database Introduction 4 min read PHP Database connection 2 min read PHP | MySQL ( Creating Database ) 3 min read PHP | MySQL ( Creating Table ) 3 min read PHP AdvancePHP Superglobals 6 min read PHP | Regular Expressions 12 min read PHP Form Handling 4 min read PHP File Handling 4 min read PHP | Uploading File 3 min read PHP Cookies 9 min read PHP | Sessions 7 min read Like