+ Reply to Thread
Results 1 to 4 of 4

Calculate time difference in a query

  1. #1
    Forum Contributor
    Join Date
    11-27-2009
    Location
    Austin, Texas
    MS-Off Ver
    Excel 2013 & 2016
    Posts
    409

    Calculate time difference in a query

    Hi all,

    I am wanting to calculate the difference between two times in a query. Here is what I have:

    Please Login or Register  to view this content.
    So, for example if I have 2:36pm as the timestrt and 6:01pm as timeend, but it's showing 205.00, I want to see 3:25 as the result
    How do I change the expression to show this?
    ==========
    Bigroo1958
    Austin, Texas
    ==========

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: Calculate time difference in a query

    The "n" means you are returning the answer in minutes. If you want h:mm, I wouldn't even bother with DateDiff.
    Please Login or Register  to view this content.
    Jeff
    | | |·| |·| |·| |·| | |:| | |·| |·|
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Forum Contributor
    Join Date
    11-27-2009
    Location
    Austin, Texas
    MS-Off Ver
    Excel 2013 & 2016
    Posts
    409

    Re: Calculate time difference in a query

    Thanks for the correction to my query expression, this works just as wanted within the query.
    But, I get an error on my report with the same formula which feeds from the query saying "This expression is typed incorrectly". Do need a different expression to sum all the time differences within my report?
    Thanks

  4. #4
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: Calculate time difference in a query

    I know VBA but I am not an Access expert. I do not understand how you generate a report from this and how you get such an error.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Query to Compute Time difference
    By puuts in forum Access Tables & Databases
    Replies: 2
    Last Post: 02-14-2015, 02:33 AM
  2. Replies: 1
    Last Post: 10-19-2012, 02:08 PM
  3. [SOLVED] Formula Query: How to calculate the difference between two columns of data?
    By The_Snook in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-25-2012, 08:14 AM
  4. Replies: 3
    Last Post: 03-02-2012, 08:18 PM
  5. How to calculate sum of time difference
    By Abhijit2011 in forum Excel General
    Replies: 4
    Last Post: 11-23-2011, 08:26 AM
  6. Query: Difference between date/time columns
    By uneek78 in forum Access Tables & Databases
    Replies: 5
    Last Post: 11-05-2009, 02:32 PM

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1