Hello,
This is the code that I need but, I need help on the between dates portion. How should the "dateadd(“yyyy”,-1,[MaxDate])+1" portion be written?
SELECT [Payroll Transaction History].EmpNo, [Payroll Transaction History].Date, [Payroll Transaction History].DBA, [Payroll Transaction History].Hours, [Payroll Transaction History].YTDIncNo, [Pay Types].Vac, [Pay Types].[DBA Description]
FROM [Payroll Transaction History] INNER JOIN [Pay Types] ON [Payroll Transaction History].DBA = [Pay Types].DBA
WHERE ((([Payroll Transaction History].Date) Between dateadd(“yyyy”,-1,[MaxDate])+1 And [MaxDate]) AND (([Pay Types].Vac)="y"));
As always, any suggestions would be greatly appreciated.
-Foxhound
This is the code that I need but, I need help on the between dates portion. How should the "dateadd(“yyyy”,-1,[MaxDate])+1" portion be written?
SELECT [Payroll Transaction History].EmpNo, [Payroll Transaction History].Date, [Payroll Transaction History].DBA, [Payroll Transaction History].Hours, [Payroll Transaction History].YTDIncNo, [Pay Types].Vac, [Pay Types].[DBA Description]
FROM [Payroll Transaction History] INNER JOIN [Pay Types] ON [Payroll Transaction History].DBA = [Pay Types].DBA
WHERE ((([Payroll Transaction History].Date) Between dateadd(“yyyy”,-1,[MaxDate])+1 And [MaxDate]) AND (([Pay Types].Vac)="y"));
As always, any suggestions would be greatly appreciated.
-Foxhound