DATEDIFF, DECIMALTOTIME, TIMETODECIMAL | WordPress.org

[ad_1]

I want to sum two time periods which I pre-calculate using DATEDIFF and also format conversion.

However, I cannot get the desired result in the year, month, day format.

(I already looked at you here –link-, but I couldn’t do it)

Here are some code inserts to understand the question

fieldname17:
(function(){var o = DATEDIFF( fieldname3, fieldname2, “dd.mm.yyyy”, “y”);
return CONCATENATE(o[“years”], ” “, o[“months”], ” “, o[“days”]);
})()

fieldname18:
(function(){var o = DATEDIFF( fieldname13, fieldname12, “dd.mm.yyyy”, “y”);
return CONCATENATE(o[“years”], ” “, o[“months”], ” “, o[“days”]);
})()

DECIMALTOTIME(SUM(TIMETODECIMAL(fieldname17,”dd.mm.yyyy”,”y”),TIMETODECIMAL(fieldname18,”dd.mm.yyyy”,”y”)),”y”,”y,m,d”)

 

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