Home / PHP Tips Generated By ChatGPT / Formatting Date and Time in PHP Display the current date and time using a specified format. Source Code echo date('Y-m-d H:i:s');