1 Reply Latest reply on Oct 5, 2008 7:12 AM by gkaiseril

    Time calculate in Adobe Designer

      Hi i want to write with FormCalc one Skript which calculate the time in minutes.

      1 example for this

      Field1: Time coming: 08:30
      Field2: Time ending: 10:00

      Field3: whole time: 90 minutes

      Field1 and 2 are Date&Time fields
      Field3 must be numeric field?

      In the FormCalc i have this: Field2-Field1 but that dont work.
      Can anybody help me?
        • 1. Re: Time calculate in Adobe Designer
          gkaiseril MVP & Adobe Community Professional
          Time and Date fields are text fields with a standard format that includes number and non-numeric fields, but they are still text fields and not numeric fields. You need to convert the textt time string to a numeric value, perform the required coputation and then convert the results back into a text field with the necessary formatting characters.

          You can use the Time2Num() function to convert the time string to milliseconds from LiveCycles' standaard Epoch date. If you do this for both fields, you can then compute the difference. Now just do some division and truncating to get the time sections.

          Note you may need to use the 2nd parameter for the exact format of the time being processed so the time's numberic value can be properly computed.