4 Replies Latest reply on Dec 13, 2012 12:50 PM by DavidHeunis

    Hi there total newbie need some help please

    DavidHeunis

      Title

      Hi there total newbie need some help please

      Post

           Hi all

           Need some help calculating a field of the following data.

           I get a csv file with the duration of a call in the following format --->  06:15

           The above data field reflects time of the call meaning 06=min 15=seconds

           I need to get converted into a new field but need to calculate the total in seconds

           so the math is (06*60) + (15) = 375 seconds, how do i create a calculation in filemaker to automate the conversion 

           Can not figure out how to get around the :

           Any help welcome.

            

           Thanks

        • 1. Re: Hi there total newbie need some help please
          philmodjunk

               If you can import that data into a field of type time, you won't need any calculation. A time field will display your time in the 06:15 format, but the value in the field will be in seconds.

               If you import the data into a text field, GetAsNumber ( GetAsTime ( YourTextFieldWithThisData ) )

               Should also return the time in seconds, in number format.

          • 2. Re: Hi there total newbie need some help please
            DavidHeunis

                 PhilModJunk

                 This is what i have done i need to get the value of dur_sec to be the calculated value of min_sec witch is in the 06:06 format.

                 I have attached a pic of the layout.

                 Above solution does not work dur_sec stays empty.

                 [IMG]http://i50.tinypic.com/21joqxf.jpg[/IMG]

            • 3. Re: Hi there total newbie need some help please
              philmodjunk

                   Note that you an use the Upload an image controls below the Post a Answer box to upload a jpg file so that it appears in your posted message.

                   By selecting and right clicking, I was able, however, to view the image. I made two different suggestions and you appear to be trying to combine the two instead of trying them separatly. GetAsNumber ( GetAsTime ( ) ) was to be used if your data was of type TEXT, not of type TIME--as might happen with certain data import operations.

                   Using the time field min_sec, all you need use for the calcualtion field is just the name of the time field. Use:

                   min_sec as your calculation for the dur_sec field.

                   But note that because you have set up a number field with an auto-entered calculation instead of a calculation field that returns a number, making this change won't affect any existing records, the change will only occur for any new records that you create. Try using a field of type calculation instead of a field of type number of dur_sec. You can click dur_sec in the manage | database window and use the drop down to change the field from number to calculation to make this change.

              • 4. Re: Hi there total newbie need some help please
                DavidHeunis

                     Thank you so much working like a charm