Title: Hours format
Last modified: March 18, 2023

---

# Hours format

 *  Resolved [Sportuojantys](https://wordpress.org/support/users/needfeed/)
 * (@needfeed)
 * [3 years, 2 months ago](https://wordpress.org/support/topic/hours-format/)
 * Hello, I have problem with calculator, that it would understand my operation 
   as 24 hour format number.
 * User selects the number from dropdown (from ’10’ to ’15’, this is an hour on 
   which they start eating breakfast, while doing intermittent fasting) and calculator
   show intermittent fasting time (16 hours period, while they can’t eat anything)
 * (function(){
   var result = (fieldname11+8);var resultt = (fieldname11+16);var 
   resulttt = CONCATENATE (‘intermittent fasting time is from ‘,result, ‘ hour, 
   to’, resultt, ‘ hour’);})()Is there a way to make sure that calculator understands,
   that answer shouldn’t be up to “24” and if number is bigger, then it should be’
   00’ to ’24’ hours?
 * Thanks in advance 🙂
    -  This topic was modified 3 years, 2 months ago by [Sportuojantys](https://wordpress.org/support/users/needfeed/).

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Plugin Author [codepeople](https://wordpress.org/support/users/codepeople/)
 * (@codepeople)
 * [3 years, 2 months ago](https://wordpress.org/support/topic/hours-format/#post-16572358)
 * Hello [@needfeed](https://wordpress.org/support/users/needfeed/)
 * Thank you very much for using our plugin.
 * You can implement the equation as follows:
 *     ```wp-block-code
       (function(){
       var result = (fieldname11+8);
       var resultt = (fieldname11+16);
   
       if(24<result) result = result - 24;
       if(24<resultt) resultt = resultt - 24;
   
       return CONCATENATE ('intermittent fasting time is from ',result, ' hour, to', resultt, ' hour');
       })()
       ```
   
 * Best regards.
 *  Thread Starter [Sportuojantys](https://wordpress.org/support/users/needfeed/)
 * (@needfeed)
 * [3 years, 2 months ago](https://wordpress.org/support/topic/hours-format/#post-16572833)
 * Wow, thanks, it’s working fine! 🙂

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Hours format’ is closed to new replies.

 * ![](https://ps.w.org/calculated-fields-form/assets/icon-256x256.jpg?rev=1734377)
 * [Calculated Fields Form](https://wordpress.org/plugins/calculated-fields-form/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/calculated-fields-form/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/calculated-fields-form/)
 * [Active Topics](https://wordpress.org/support/plugin/calculated-fields-form/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/calculated-fields-form/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/calculated-fields-form/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [Sportuojantys](https://wordpress.org/support/users/needfeed/)
 * Last activity: [3 years, 2 months ago](https://wordpress.org/support/topic/hours-format/#post-16572833)
 * Status: resolved