Results 1 to 4 of 4
  1. #1
    Join Date
    May 2013

    Unanswered: Convert hh:mm:ss to Number

    Good morning,

    I'm trying to figure out if it is possible either in a query or report to convert time to a decimal number.

    112:09:51 converted to 112.09

    any and all help is greatly appreciated.

  2. #2
    Join Date
    May 2013
    I ask because in the report that I'm working on I'll need to show Run Rate per hour which consist of Exit volume / Time

    Exit Volume / Time as Number = Run Rate
    646,280 / 112.09 = 5,765.72


  3. #3
    Join Date
    Nov 2004
    out on a limb
    Provided Answers: 59
    =hours(mytimevalue) + minutes(mytimevalue)/100
    but surely you want it as a 'true decimal' (ie proportion of an hour)
    =hours(mytimevalue) + minutes(mytimevalue)/60 + seconds(mytimevalue)/3600

    another slightly kludgy way of achieving this is to take advantage of the way Accewss (using JET, its default storage medium) is convert the date time value directly into the proportion of hours. this assumes, as above, that you are using a sdatetime column/variable

    = dbl(mytimevalue)*24

    FWIW JET soters datetimes as a double value number.
    the integer part contains the number fo days form an arbitary point in time (day 1 is, IIRC, 31 Dec 1899), the decimal is the proportion of the day

    .50 is 12:00:00
    .75 is 18:00:00
    0.00069444444 is one second (or 1/60/24)
    Last edited by healdem; 05-23-14 at 13:10.
    I'd rather be riding on the Tiger 800 or the Norton

  4. #4
    Join Date
    May 2013
    Thanks Healdem,

    So do this go in the Query or Report? Is this the correct way to input it?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts