Buy Now
Sign in

Calculate days

ozkrsanchez , November 28 2020, 05:24
O
ozkrsanchez 62
November 28 2020, 05:24 #395074
Hi everybody,
I have a form, here i used a field Calendar, i need calculated of wait days.
Example,
calculateDays.JPG
Can somebody help me?
admin 32
November 29 2020, 02:39 #395083
you need to call a PHP function and pass the date value and do the calculation in PHP code!
O
ozkrsanchez 62
November 29 2020, 07:12 #395085
Example, pls!!!
healyhatman 9
November 30 2020, 12:06 #395097
$now = new DateTime();
$date = new DateTime($this->var('row.model.date_field'));
$days = $date->diff($date1)->format(%a);
Web developer at SkySpider.com.au - I DO NOT work for ChronoEngine!
Donations: paypal.me/healyhatman
Professional Work: kamron@skyspider.com.au
Custom CF / CC Plugins and Extensions: skyspider.com.au/store