I am storing appointments by adding 15 minutes to current date as default appointment duration and trying to add Minutes to a date obtained by following code:
$curr_date=new DateTime(date("Y-m-d H:i:s"));--Obtained the current date and time.
$curr_date->add(new DateInterval('P15M'));--Adding 15 minutes
But when I save the Model it throws error saying:
Object of class DateTime could not be converted to string
Any help would be greatly appreciated.