Hello:
After an input, I need to obtain the days between two dates (fields fdesde and fhasta - dd/mm/yyyy - take with the datepicker).
I found the date_diff function in the php manual
This is the code I put in Add Page - Before record added.
$values["diferencia"] = date_diff($values["fdesde"],$values["fhasta"]);
And this is the error message:
date_diff() expects parameter 1 to be DateTime, string given
How I convert the fields to date on the fly?
or
Exist another way to obtain the days between two dates?
Sorry about my english.