Results 1 to 2 of 2
  1. #1
    New Lounger
    Join Date
    Jun 2003
    Thanked 0 Times in 0 Posts

    date diff (2000)

    I have put the calculation in to work out the hours difference between two date and time fields. i.e. =[date 2] + [Time 2] - [Date 1] - [Time 1] *24 . The result I get is correct as a number of hours with a proportion of an hour following the decimal point. Just want to know how covert this to an hours and minutes format. When I put it into a form or report and covert the format of the field to short time the result is incorrect.

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Thanked 28 Times in 28 Posts

    Re: date diff (2000)

    To get decimal hours, use =([Date2] + [Time2] - [Date1] - [Time1]) * 24 (note the brackets!)
    To display as hours and minutes, the easiest way is not to multiply by 24, but let the Format property take care of it: use the expression =[Date2] + [Time2] - [Date1] - [Time1] and set the Format property to Short Time or to h:mm.

Posting Permissions

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