Forum Discussion

AidonOlligschla's avatar
AidonOlligschla
Qrew Cadet
7 months ago

Quirky Formatted Text / Duration Formula

Hello All,

I hope everyone had a great weekend.  Wanted to bring something up to the group and wondering if anyone else has seen something similar:

I am currently taking a numeric field (Block Hours), using another field to convert it to a duration (Block Hours Duration), and then using a formatted text formula to convert it to HH:MM.  Theoretically, if there's only one decimal place, every minute value should be a multiple of 6.  However, I've noticed with only a few different values that it is coming out incorrect: 2.3 hours comes to 2hrs 17min, 4.1 hours comes to 4hrs 5min.  This does not happen with every 0.3 or 0.1 value either, it only seems to occur on very specific values for some reason.

Am I missing something here?

Pic #1:

Pic #2:



------------------------------
Aidon Olligschlager |
Flight Operations Technical Support
Pentastar Aviation
Waterford MI
aolligschlager@pentastaraviation.com | 248-202-9587
------------------------------

8 Replies

  • Can you adjust the formatting of the Block Hours field to expose more decimal places?  Right now you are setting that field to display just 1 decimal.  That way we can see what the real value is.  Or perhaps you want to round that Block hours to one decimal before converting to HH:MM.



    ------------------------------
    Mark Shnier (Your Quickbase Coach)
    mark.shnier@gmail.com
    ------------------------------
    • AidonOlligschla's avatar
      AidonOlligschla
      Qrew Cadet

      Hi Mark,

      Yes, we would prefer to keep the values rounded to the tenth.  I believe it is a longer value and only displaying as one decimal point.  However, I'm not sure why the numeric value would be anything other than down to the tenth - when I import the data it is rounded to the tenth.



      ------------------------------
      Aidon Olligschlager |
      Flight Operations Technical Support
      Pentastar Aviation
      Waterford MI
      aolligschlager@pentastaraviation.com | 248-202-9587
      ------------------------------
      • ChayceDuncan's avatar
        ChayceDuncan
        Qrew Captain

        Are you doing anything with the formula beyond just doing ToFormattedText with HHMM as the parameter? It might be a quirk with how QB does the conversion. Have you tried to parse it out yourself and just split it yourself to do the remainder * 6?



        ------------------------------
        Chayce Duncan
        ------------------------------