Ally
Registered User.
- Local time
- Today, 13:43
- Joined
- Sep 18, 2001
- Messages
- 617
I have a (make-table) query with Date parameters. The field is dd/mm/yy which I have converted to yy/mm. I also have two new fields to input the new converted date - StDate and EndDate.
SQL:
PARAMETERS [Enter Start Date yy/mm] Text, [Enter End Date yy/mm] Text;
SELECT DispErrors.*, Format([Enter Start Date yy/mm],"mmmm yyyy") AS StDate, Format([Enter End Date yy/mm],"mmmm yyyy") AS EndDate INTO GetDates
FROM DispErrors
WHERE (((Format([IncDate],"yy/mm")) Between [Enter Start Date yy/mm] And [Enter End Date yy/mm]));
The problem I'm getting is, although the records returned do correspond to the dates I entered, the new fields StDate and EndDate return 2002: eg, if I enter [Start Date] 01/01 and [End Date] 01/08 the text string in the new field returned are January 2002 and August 2002 although the records returned are between January and August 2001.
I did try putting parameters in, but that didn't make any difference.
*** *** *** *** *** *** *** ***
I have just tried taking out the Format([Enter....),"mmmm yyyy" on the new fields and it returned the correct text string, but obviously only as 01/01 and 01/08. So, I thought I'd convert it to "mmmm yyyy" in the report, but the same thing has happened.
Anyone any ideas please?
SQL:
PARAMETERS [Enter Start Date yy/mm] Text, [Enter End Date yy/mm] Text;
SELECT DispErrors.*, Format([Enter Start Date yy/mm],"mmmm yyyy") AS StDate, Format([Enter End Date yy/mm],"mmmm yyyy") AS EndDate INTO GetDates
FROM DispErrors
WHERE (((Format([IncDate],"yy/mm")) Between [Enter Start Date yy/mm] And [Enter End Date yy/mm]));
The problem I'm getting is, although the records returned do correspond to the dates I entered, the new fields StDate and EndDate return 2002: eg, if I enter [Start Date] 01/01 and [End Date] 01/08 the text string in the new field returned are January 2002 and August 2002 although the records returned are between January and August 2001.
I did try putting parameters in, but that didn't make any difference.
*** *** *** *** *** *** *** ***
I have just tried taking out the Format([Enter....),"mmmm yyyy" on the new fields and it returned the correct text string, but obviously only as 01/01 and 01/08. So, I thought I'd convert it to "mmmm yyyy" in the report, but the same thing has happened.
Anyone any ideas please?
Last edited: