Hi friends, today I will tell you through this tutorial how you can get the current date and time with the help of php.
How to get current date and time in php., Get current datetime using PHP., How to get current date in certain format., Get current IST time in php
Syntax for date/time()
date_format: Here the date format is given. It prints the current date. It converts timestamp to date / time format.
timestamp: it is optional here. If no value is given then the current timestamp is given.
<?php echo date('Y-m-d H:i:s'); ?>