Results 1 to 5 of 5

Thread: Show hours > 24

  1. #1
    Join Date
    Dec 2003
    Location
    Belgium
    Posts
    42

    Unanswered: Show hours > 24

    Hi,

    I have a problem when I'm making a sum of some hours:
    ex:

    10:00
    20:00
    --------+
    25:00 (= 25h)

    The problem is that I can't show 25:00 as a time notation (because hours can only go from 0 to 23). Is there anyway to make this work?

    Thanx in advance,

    Koen

  2. #2
    Join Date
    Sep 2002
    Location
    South Wales
    Posts
    580

    Format

    What is the field type - Date/Time?
    Windows Server 2003-8 / Terminal Services / SQL 2000 / Access 2003 / Office 2003-7 / Exchange 2003-7 / Blackberry Enterprise Server / AutoCAD / Lambert And Butler / Red Bull

  3. #3
    Join Date
    Dec 2003
    Location
    Belgium
    Posts
    42

    Re: Format

    Originally posted by garethdart
    What is the field type - Date/Time?
    Yes...

  4. #4
    Join Date
    Sep 2002
    Location
    South Wales
    Posts
    580

    Datediff / Mod

    Not sure what context you need this in, but look at using datediff in conjunction with MOD

    debug.Print (datediff("D", #01/01/03 08:00#, #01/02/03 10:00#)) & " days:" & datediff("h", #01/01/03 08:00#, #01/02/03 10:00#) mod 24 & "Hours"

    Gives you 1 days, 2 hours

    Further details on DateDiff and Mod can be found in Access Help
    Windows Server 2003-8 / Terminal Services / SQL 2000 / Access 2003 / Office 2003-7 / Exchange 2003-7 / Blackberry Enterprise Server / AutoCAD / Lambert And Butler / Red Bull

  5. #5
    Join Date
    Dec 2003
    Location
    Belgium
    Posts
    42

    Re: Datediff / Mod

    Originally posted by garethdart
    Not sure what context you need this in, but look at using datediff in conjunction with MOD

    debug.Print (datediff("D", #01/01/03 08:00#, #01/02/03 10:00#)) & " days:" & datediff("h", #01/01/03 08:00#, #01/02/03 10:00#) mod 24 & "Hours"

    Gives you 1 days, 2 hours

    Further details on DateDiff and Mod can be found in Access Help
    thx Garethdart !

Posting Permissions

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