Welcome to SPN

Register and Join the most happening forum of Sikh community & intellectuals from around the world.

Sign Up Now!
  1. Guest ji, please consider donating today!
      Become a Supporter    ::   Make a Contribution   
    Monthly Recurring Target: $300 :: Achieved: $95

Re: Entering time in a field

Discussion in 'Information Technology' started by Margy, Nov 2, 2005.

  1. Margy

    Margy
    Expand Collapse
    Guest

    So what is the solution? I have the same problem as Gina. I do want to sort
    the times (athletics results ) and work out means and max's and mins
    eventually.
    Margy

    "Douglas J. Steele" wrote:

    > Unfortunately, storing it as text means she won't be able to sort it
    > properly, one of her requirements.
    >
    > The times will sort as
    >
    > 1:15.0
    > 10:15.0
    > 11:15.0
    > 2:15.0
    > 3:15.0
    >
    > not the required
    >
    > 1:15.0
    > 2:15.0
    > 3:15.0
    > 10:15.0
    > 11:15.0
    >
    > She could include a leading 0 where necessary, but that's ackward:
    >
    > 01:15.0
    > 02:15.0
    > 03:15.0
    > 10:15.0
    > 11:15.0
    >
    >
    > --
    > Doug Steele, Microsoft Access MVP
    > http://I.Am/DougSteele
    > (no e-mails, please!)
    >
    >
    >
    > "Paul Overway" <paul@I.hate.spam.logico-solutions.com> wrote in message
    > news:%23k9REfmAFHA.2032@tk2msftngp13.phx.gbl...
    > > Yes...that would be another way. But given her apology for asking a
    > > newbie question, hard to say whether she wanted to take on writing the
    > > functions. If she stores it as text, she's done...as long she doesn't need
    > > to do calculations.
    > >
    > > --
    > > Paul Overway
    > > Logico Solutions
    > > http://www.logico-solutions.com
    > >
    > >
    > > "Douglas J. Steele" <NOSPAM_djsteele@NOSPAM_canada.com> wrote in message
    > > news:eZDLNHmAFHA.824@TK2MSFTNGP11.phx.gbl...
    > >> Actually, the usual recommendation is to pick whatever resolution you
    > >> want, and then store the duration in a Long Integer. In other words, if
    > >> you want 10ths of seconds, and the time is 1:15.5, store that as 755.
    > >> Create a couple of functions to convert back and forth, and you're pretty
    > >> much done.
    > >>
    > >> --
    > >> Doug Steele, Microsoft Access MVP
    > >> http://I.Am/DougSteele
    > >> (no e-mails, please!)
    > >>
    > >>
    > >>
    > >> "Paul Overway" <paul@I.hate.spam.logico-solutions.com> wrote in message
    > >> news:%235z6dIlAFHA.3824@TK2MSFTNGP10.phx.gbl...
    > >>> Hamster races...interesting! :eek:)
    > >>>
    > >>> Unfortunately, the DateTime data type, which would be your most logical
    > >>> pick, does not have the precision needed to stored tenths of a second
    > >>> and even less milliseconds. If seconds are adequate, the format would
    > >>> need to be n:ss
    > >>>
    > >>> Your other option would be to store the times as text.
    > >>>
    > >>> --
    > >>> Paul Overway
    > >>> Logico Solutions
    > >>> http://www.logico-solutions.com
    > >>>
    > >>>
    > >>> "Gina K" <GinaK@discussions.microsoft.com> wrote in message
    > >>> news:9AD65D4D-C4D5-489F-913A-B06976AA4738@microsoft.com...
    > >>>> Maybe I'm making this harder than it is...here goes.
    > >>>> I want to enter a time in a field - not a time as in 1:15 PM, but a
    > >>>> time as
    > >>>> in 1 minute, 15.5 seconds (1:15.5) (say, for instance, the amount of
    > >>>> time it
    > >>>> took a hamster to complete a maze). I'd also like to be able to sort a
    > >>>> report on the data in this field. What data type should I assign to
    > >>>> this
    > >>>> field, and is there an input mask/format that will get me the results
    > >>>> I'm
    > >>>> looking for?
    > >>>> Sorry for such a newbie question,
    > >>>> Gina
    > >>>
    > >>>
    > >>
    > >>

    > >
    > >

    >
    >
    >
     
  2. Loading...


  3. John Vinson

    John Vinson
    Expand Collapse
    Guest

    On Tue, 1 Nov 2005 18:02:02 -0800, "Margy"
    <Margy@discussions.microsoft.com> wrote:

    >So what is the solution? I have the same problem as Gina. I do want to sort
    >the times (athletics results ) and work out means and max's and mins
    >eventually.


    Store the racetimes in seconds and fractional seconds, probably in a
    Double.

    To format 483.24 seconds in minutes and seconds, use an expression
    like

    [Racetime] \ 60 & ":" & Format([Racetime] - 60 * ([Racetime] \ 60),
    "00.00")


    John W. Vinson[MVP]
     
Since you're here... we have a small favor to ask...

More people are visiting & reading SPN than ever but far fewer are paying to sustain it. Advertising revenues across the online media have fallen fast. So you can see why we need to ask for your help. Donating to SPN's is vote for free speech, for diversity of opinions, for the right of the people to stand up to religious bigotry. Without any affiliation to any organization, this constant struggle takes a lot of hard work to sustain as we entirely depend on the contributions of our esteemed writers/readers. We do it because we believe our perspective matters – because it might well be your perspective, too... Fund our efforts and together we can keep the world informed about the real Sikh Sikhi Sikhism. If everyone who writes or reads our content, who likes it, helps us to pay for it, our future would be much more secure. Every Contribution Matters, Contribute Generously!

    Become a Supporter      ::     Make a Contribution     



Share This Page