I have two date variables:
$dnow = "2016-12-1";
$dafter = "2016-12-11";
I want to calculate the difference of this two dates which are in string format so how do I calculate?
but it expecting two date object, and I have dates in String
, After using
I get following error
Message: Object of class DateInterval could not be converted to string.