This question has already been answered:
How to calculate the number of days between two dates?
In the MySQL table there are fields arrival and departure . Recorded in varchar in this form 03/14/2019 . I transfer the data through input data.
I tried this, but it does not work:
$date1 = $post['departure']; $date2 = $post['arrival']; $diff = $date1 - $date2; echo $diff;