Results 1 to 4 of 4
  1. #1
    robrich22's Avatar
    robrich22 is offline Advanced Beginner
    Windows 7 64bit Access 2007
    Join Date
    Feb 2013
    Location
    Louisville, KY
    Posts
    41

    Calculate Minutes Between Two Dates and Times


    Ok, I'v been using DateDiff to calculate hours between two times. Some of my records have different Start Dates/End Dates and I'd like to figure the total minutes between start date and end date time.

    For Example..

    Start Date: 01/01/2014
    Start Time: 13:00

    End Date: 01/02/2014
    End Time: 13:00

    I can use DateDiff("n", StartTime, EndTime) and it reports 0 because it doesn't account for the different dates. Is there a function to do this, or has anybody written one?

    Thanks

  2. #2
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,726

  3. #3
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    Does that YouTube show concatenating the date and time parts? (I can't view it now.)
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  4. #4
    robrich22's Avatar
    robrich22 is offline Advanced Beginner
    Windows 7 64bit Access 2007
    Join Date
    Feb 2013
    Location
    Louisville, KY
    Posts
    41
    I figured it out.. Here's the solution.

    =DateDiff("n",[StartDate] & " " & [StartTime],[EndDate] & " " & [EndTime])

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 5
    Last Post: 09-11-2013, 03:42 PM
  2. how to calculate hours
    By ultra5219 in forum Queries
    Replies: 2
    Last Post: 05-23-2013, 04:22 PM
  3. calculate rate * hours worked
    By hamish mather in forum Queries
    Replies: 1
    Last Post: 12-22-2011, 06:14 AM
  4. Times greater than 24 hours
    By ccordner in forum Access
    Replies: 2
    Last Post: 11-28-2011, 12:46 PM
  5. How to calculate duration in hours & minutes
    By joypanattil in forum Access
    Replies: 0
    Last Post: 11-25-2009, 04:49 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums