Results 1 to 3 of 3
  1. #1
    Join Date
    Feb 2003
    Location
    New Zealand
    Posts
    2

    Unanswered: How can I count the values of a datediff ?

    I have a database which maintains all of the customer support calls for our customers. For reports I have a start and end date of a support issue. The amount of time to resolve the support issue is calculated in days using the DateDiff function, this works fine and returns the column in the report with all of correct figures. What I am trying to do now is to count the amount of returned records which will be:
    <1 day
    <2 days
    >=2days
    still open

    The current results return a single digit where 0 is equal to less than 1 day, 1 = one day etc, no result means that the support problem is not resolved and still open.
    I manaually count the amount of numbers at present but there are many pages and I am always looking for easier ways. Can this be achieved or do I have to use an array to store values, if so how?

  2. #2
    Join Date
    Feb 2003
    Location
    Auckland, NZ
    Posts
    150

    Re: How can I count the values of a datediff ?

    Yes you can create a query in design view or in SQL as follows:

    SELECT <single digit value>, COUNT(<single digit value>) AS COuntOfValue,
    FROM <query or table>
    GROUP BY <single digit value>


    <single digit value> - Name of The single digit value you mention
    <query or table> - Name of the query where this single digit value is.

    Machado

  3. #3
    Join Date
    Feb 2003
    Location
    New Zealand
    Posts
    2

    Thanks very much

    Appreciated your help, ended up doing it slightly different (only to suit my output needs) but it was based on your reply... and it works. Thanks.

Posting Permissions

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