11 Replies Latest reply on Nov 25, 2012 1:37 PM by martinhstngs

    Race times...millisecond

    mbenseman

      Hi

       

      Imam using FM 11 advanced Pro

       

      I am trying to enter race times in a database and need to include milliseconds. When in enter say 1:30.45, fm seems to store the milliseconds, but I can't get a field to display it.

       

      I have tried setting the Time format to mmss and the number format to 2 decimal places, but all it displays is 1:30.00; it always seems to display two zeros. Nthe data is correct because if I turn it into a number of seconds I get 90.45.

       

      What am i doing wrong on my layout edit box formatting? Also although I have seen reference to custom formats for time layout boxes, that does not seem to be an option when I am in the navigator.

       

      I could enter the race times as number of second, just using a number field, but would like if possible to use time.

       

      Any help most appreciated.

       

      Thanks

       

      Mark

        • 1. Re: Race times...millisecond
          comment

          In order to show fractions of a second, a Time field must be formatted to display 'As entered'.

           

          If you want a better formatted display, use a calculation field with a Text result - or perhaps a web viewer.

          • 2. Re: Race times...millisecond
            Bobster

            Hi Mark,

             

            I guess Michael has answered your question about how to format the field.

             

            Yesterday, I heard a FileMaker Success Tips podcast which claims that there's an undocumented function in FM12.

             

            Get (UTCmsecs)

             

            If I understand it correctly, it returns a time-stamp which includes milliseconds.

             

            I don't have FM12 yet, so I can't confirm that it's still undocumented.

             

            Steve Dolenski drew attention to it. Thanks, Steve.

             

            Regards,

             

            Bob.

            • 3. Re: Race times...millisecond
              mbenseman

              Thanks...I'll have a look at it.

              • 4. Re: Race times...millisecond
                datastride

                I use this undocumented function quite a bit in performance testing. It works like a charm. Having the higher resolution timer makes it so much easier to do performance testing, as I no longer have to create thousands and thousands of records to be able to make certain operations take long enough for the Get(CurrentTime) function to be useful.

                 

                 

                 

                I sure hope Get (UTCmsecs) becomes a “documented” feature and sticks around! Please let FMI know you’d like to see this function become a permanent fixture.

                 

                 

                 

                Peace, love & brown rice,

                 

                Morgan Jones

                 

                 

                 

                FileMaker + Web:  Design, Develop & Deploy

                 

                Certifications: FileMaker 9, 10, 11 & 12

                 

                Member: FileMaker Business Alliance

                 

                One Part Harmony <http://www.onepartharmony.com/>  

                 

                Austin, Texas • USA

                 

                512-422-0611

                • 5. Re: Race times...millisecond
                  jbante

                  To clarify what the Get ( UTCmSecs ) function does, it returns a number of milliseconds (not already formatted as a timestamp) for UTC. You can convert the value to a proper timestamp with "GetAsTimestamp ( Get ( UTCmSecs ) / 1000 )". If you want a millisecond-precision timestamp for the current timezone, you'll have to compare that to Get ( CurrentTimestamp ) and make any appropriate adjustments. That said, the original post says mbenseman was using FileMaker 11; if that's still the case, this is a moot point, since FileMaker 11 doesn't have this function.

                  • 6. Re: Race times...millisecond
                    comment

                    jbante wrote:

                     

                    this is a moot point, since FileMaker 11 doesn't have this function.

                     

                    And, IIUC, the original question was about formatting manually entered times - not capturing the current time.

                    • 7. Re: Race times...millisecond
                      jbante

                      Touché.

                      • 8. Re: Race times...millisecond
                        Bobster

                        Well, I only brought it up to alert developers who are interested in capturing Time in milliseconds that this neat undocumented function exists.

                         

                        Bob Stuart

                        Lord Of The Files

                        Think Data Pty Ltd

                        Noosa

                        Queensland

                        Australia.

                         

                        +61 7 5442 5624

                        +61 413 350 993

                        • 9. Re: Race times...millisecond
                          martinhstngs

                          Hi,

                           

                          I am coing back to using FM12 after not having done anything in it for about 10 years.  I have a related question that I hope sombody can answer for me.

                           

                          I am also trying to create a database for race results, and this string answers one of my queries.  But I have another one that is baffling me.

                           

                          The sport is dragonboating and we have clubs racing at a regatta in multiple races, and they race in six lanes, and the points they get in those races add up to a championship at the end of the season.

                           

                          I am starting as a base record being the race number at a particular regatta, the lane the club is in, the timing of the race and the place they came in that race.

                           

                          what I am trying to create is a race draw where the column headings are the lanes and the race number is on the left hand side.  By using a calculating field I can get a report to show the result of who is in what lane, but that means for every race I would have 6 rows with only one field in each six lanes showing a result.  I was hoping that I could use a summary function that showed the result of any calculation in the lane funcion, but no luck.

                           

                          This is all hard to explain, but hope I have done it sufficiently,

                           

                          does anybody have any ideas?

                           

                          Cheers

                           

                          Martin

                          • 10. Re: Race times...millisecond
                            Malcolm

                            what I am trying to create is a race draw where the column headings are the lanes and the race number is on the left hand side. 

                             

                            You are trying to create a cross-tab report. Search for that and you'll find plenty of references.

                             

                            Malcolm

                            • 11. Re: Race times...millisecond
                              martinhstngs

                              Thanks I will do that

                               

                              Sent from my iPhone