Forums

Calculate days

ozkrsanchez 28 Nov, 2020
Hi everybody,

I have a form, here i used a field Calendar, i need calculated of wait days.

Example,



Can somebody help me?
Max_admin 29 Nov, 2020
you need to call a PHP function and pass the date value and do the calculation in PHP code!
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
healyhatman 30 Nov, 2020
$now = new DateTime();
$date = new DateTime($this->var('row.model.date_field'));

$days = $date->diff($date1)->format(%a);
You need to login to be able to post a reply.