Results 1 to 3 of 3
  1. #1
    Silver Lounger
    Join Date
    Jun 2002
    Location
    Cheadle, Staffordshire
    Posts
    2,177
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Time Difference (A2k)

    (HansV: made MSKB article clickable)

    I've been reading up on <!mskb=210604>Microsoft Knowledge Base Article 210604<!/mskb> in reference to calculating time differences.
    The article is extremely useful and meets my database needs ( GetElapsedTime() ).

    I understand the need to include the date along with the time because of the midnight scenario, but.
    Entering the Date & Time in the same field can be laborious if entering loads of data.
    Is there a way to achieve the same thing, but splitting the Date from the Time, ie two fields.
    By this, the date could be set up as a default value.

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

    Re: Time Difference (A2k)

    The example for GetElapsedTime in the MSKB article uses fields StartTime and EndTime that should contain a date plus time. You could use additional fields StartDate and EndDate, and enter just the time in StartTime and EndTime. Instead of =GetElapsedTime([EndTime]-[StartTime]), use

    =GetElapsedTime([EndDate]+[EndTime]-[StartDate]-[StartTime])

  3. #3
    Silver Lounger
    Join Date
    Jun 2002
    Location
    Cheadle, Staffordshire
    Posts
    2,177
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Time Difference (A2k)

    Hans
    Thanks for the modification, I couldn't put my hands on my Dummy sheet which tells me how to include as a link.
    and
    Thanks for the code modification, just as I needed 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
  •