Strtotime It converts the date into unix time stamp format. <?php echo $dateTime=strtotime(“13-02-2016”); ?> OUTPUT To add no. of days in current date <?php $currDate = date(‘Y-m-d’) ; // 2016-04-02 $dateTime=strtotime(“$currDate + 5 days”); echo date(“Y-m-d”, $dateTime); ?> OUTPUT You ...
Home/date php
phpsupport | phpsupportdesk Latest Articles
Date
pHpSupportTO DISPLAY THE CURRENT DATE <?php $current_date = date("Y-m-d"); echo $current_date; ?> OUTPUT If you want to show current date with Hours, Minutes and Seconds. Then try the following code. <?php $current_date = date("Y-m-d H:i:s"); echo $current_date; ?> OUTPUT If ...
How can we check current date & time of PHP server?
pHpSupportWe can check the PHP server time by using the following code date(“Y-m-d H:i:s”);