Results 1 to 2 of 2
  1. #1
    Star Lounger
    Join Date
    Jul 2007
    North Carolina, USA
    Thanked 0 Times in 0 Posts

    Counting hours from Date feilds (2003)

    Date Field A has the long date/time format (9/24/2007 3:26:05 PM)
    Text box = [StartDate]-[EndDate]
    Only I want to calculate the hours portion and it calculates days, I would even settle for days and hours if it is not possible to just get total hours and minutes from start to end.
    I saw some of the other strings posted about this issue, but have been unable to produce the desired results. Any assistance would be appreciated.

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

    Re: Counting hours from Date feilds (2003)

    Wouldn't you want =[EndDate]-[StartDate] ?

    If you just want to see hours and minutes, set the Format property of the text box to h:nn. This won't take times of more than 24 hours into account, though.

    You can also change the control source to =24*([EndDate]-[StartDate]) and set the Format property to General or to Fixed. You will see the number of hours, with a decimal, for example 7.5 means 7 hours 30 minutes.

Posting Permissions

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