View Full Version : date difference problem


Mike Hughes
02-03-2010, 06:59 AM
I'm trying to get the date difference between two dates recorded in months.
Whe I run the query I get a parameter value box asking for CAT 3 SAMPLE CASES 2.RAX RESOLV. If I just click OK results are returned to the new table but the MONTHS field is empty - date difference in months was not caculated. Can someone please give the query a look and help me figure out what the problem is?

SELECT
[CAT 3 SAMPLE CASES 2].CASE,
[CAT 3 SAMPLE CASES 2].NUMBER,
[CAT 3 SAMPLE CASES 2].EP1,
[CAT 3 SAMPLE CASES 2].EP2,

=DateDiff("m",[ CAT 3 SAMPLE CASES 2].[MAX RESOLV],
[EST STATUS FROM MIKE].[CMD DATE]) AS MONTHS INTO [26 9 MONTHS]

FROM [CAT 3 SAMPLE CASES 2] INNER JOIN
[EST STATUS FROM MIKE] ON
[CAT 3 SAMPLE CASES 2].CASE=[EST STATUS FROM MIKE].CASE

WHERE ((([EST STATUS FROM MIKE].CMD)="CLSE") AND (([EST STATUS FROM MIKE].REASON)="GO"));

pbaldy
02-03-2010, 07:10 AM
Is that extra space at the beginning of the table name in the query?

Mike Hughes
02-03-2010, 07:13 AM
That was all it was, what a dope I am. THANKS !

pbaldy
02-03-2010, 07:16 AM
No problemo; sometimes we all need an extra pair of eyes.