Count days in query

JiTS

Ciao!
Local time
Today, 21:16
Joined
Dec 12, 2003
Messages
77
I got an assignment from my supervisor and I am not getting it! :(

I have a query (see result in attachment) with the following fields:
tID, emailID, emailtype and EmailDate.

Example:
A customer (tID 1297542) sends an e-mail (emailtype 1) to the company on 2-8-2005.
The company replies on that e-mail (emailtype 3) on 5-8-2005.

Problem:
I would like to create a query that shows per tID the total of days between the e-mail from the customer and the e-mail from the company (between emailtype 1 and 3).
 

Attachments

  • Query_view.jpg
    Query_view.jpg
    90.9 KB · Views: 171
AFAIK you can't do it in a query but a report based on that same query can achieve the results you are looking for.
 
Thanks! :)
 
Have you tried running a Crosstab query to an output table showing email types as columns and then in a second query working out the date difference?
 

Users who are viewing this thread

Back
Top Bottom