Results 1 to 6 of 6
  1. #1
    5 Star Lounger
    Join Date
    Mar 2001
    Posts
    989
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Call duration (2003)

    Hi. For a telephone company they want to store call durations in the format hh:mm:ss, but to allow for more than 24 hrs duration. In Excel I could use a custom format [h]:mm:ss to achieve this. How can I do the same thing in Access? Thanks, Andy.

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Call duration (2003)

    Let's say that you store call duration in a Date/Time field Duration. You can't format it directly the way you want in Access, but you could use a calculated column in a query:

    FormattedDuration: Int([Duration]*24) & ":" & Format([Duration],"nn:ss")

    or a text box on a report with a formula as control source:

    =Int([Duration]*24) & ":" & Format([Duration],"nn:ss")

  3. #3
    5 Star Lounger
    Join Date
    Mar 2001
    Posts
    989
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Call duration (2003)

    Ta. I could see how that would format it, but how would the duration be entered? It currently will now allow me to enter 26:35:20. Andy

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Call duration (2003)

    Access doesn't support entering times over 24 hours. It might be better to use separate fields (and text boxes) for hours, minutes and seconds.

  5. #5
    5 Star Lounger
    Join Date
    Mar 2001
    Posts
    989
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Call duration (2003)

    Thank you. Of course the downside to this approach is that the query expressions become that bit more complicated. I don't think there is an ideal solution. Andy.

  6. #6
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Call duration (2003)

    I agree that there is no ideal solution in Access, it would have been nice if it had supported cumulative time as in Excel.

    If you use separate fields, you can still calculate the total duration as a date/time value for use in calculations:

    [Hours] / 24 + [Minutes] / 1440 + [Seconds] / 86400

Posting Permissions

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