Difference between 2 dates | WordPress.org

Hello @graicifyd

You can use the “DATEDIFF” operation in the date/time operations module.

Assuming you have two date time fields, fieldname1 and fieldname2. You can implement the equation as follows:

(function(){
var obj = DATEDIFF(fieldname1, fieldname2, 'mm/dd/yyyy', 'd');

return CONCATENATE(obj['days'], ' days, ', obj['hours'], ' hours, ', obj['minutes'], ' minutes, and ', obj['seconds'], ' seconds');

})()

Learn more about the Date/Time operations module by reading the following section in the plugin documentation:

https://cff.dwbooster.com/documentation#datetime-module

Best regards.

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer