Time difference between countries | WordPress.org

[ad_1]

Hello @fibbu,

Thank you very much for using our plugin.

Yes. You can calculate the time difference, but the solution depends on your form structure.

For example, if you have two date/time fields in the form with only time components to allow the users to enter them (fieldname1 and fieldname2). Insert a calculated field in the form, and enter an equation similar to the following one:


(function(){
var d = DATEDIFF(fieldname1, fieldname2, 'dd/mm/yyyy hh:ii', 'h');
return d['hours']+' hours and '+d['minutes']+' minutes';
})()

If you have only two dropdown fields with places, I recommend entering the places’ names as their choices’ texts and the time zones as their values (like France 1 and Alaska -9). The equation would be:

ABS(fieldname1-fieldname2)

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