2 Replies Latest reply on Apr 25, 2011 6:27 PM by DanielPinder

    Turning text into minutes



      Turning text into minutes


      I have a time calculator built into my db that requires a denominator to be changed frequently. I want a text or number field that I can simply enter a count of minutes (say, 150 minutes) and update the amount of minutes at will. I don't want anything expressed in hh:mm:ss and the major concern is that I don't want to have to enter minutes as: "0:150:00" just to satisfy FMP's time format.

      I tried making a calculation:

      GetAsTime ( minutesInput )

      where minutesInput is the text field containing an integer, but the problem is that the calc uses the number I enter as the hours, not the minutes. What is the best way to tell it to calculate my entry as minutes, not hours?


        • 1. Re: Turning text into minutes

          If you enter 150 into a number field, a calculation can turn this into time with this expression:

          NumberField * 60  //converts minutes into seconds.

          If you specify Time as the return type for your calculation field or use a field of type Time with this expression as the auto-entered calculation, you'll be able to enter the time in minutes, but express it and use it as Time.

          Is that what you wanted?

          If not, please explain in greater detail.

          • 2. Re: Turning text into minutes

            That nailed it—thank you, and now your help has uncovered a series of other calculations that will now make life easier.