phpCopy<?php $Object = new DateTime(); $DateAndTime = $Object->format("d-m-Y h:i:s a"); echo "The current date and time are $DateAndTime."; ?>