I am working with a linked table from another database; I cannot change the nature of this table. But I do have to query it for set shifts using a user input date. I made a make table query that isolates the data I need but I cannot get it to display the correct times mainly because of the way that the linked table keeps its time/date, here is its format;
MM/DD/YYYY TT:TT:TT AM/PM
I can get it to display correctly for the current date using;
Like Date() & "*" And >#6:00:00 AM# And <#2:30:00 PM#
but it isn't the current date I need, I need it to display the correct times for first shift (6AM-2:30PM) on the records collected yesterday.
Here is the SQL for the make table query;
MM/DD/YYYY TT:TT:TT AM/PM
I can get it to display correctly for the current date using;
Like Date() & "*" And >#6:00:00 AM# And <#2:30:00 PM#
but it isn't the current date I need, I need it to display the correct times for first shift (6AM-2:30PM) on the records collected yesterday.
Here is the SQL for the make table query;
Code:
SELECT [dbo_PDTRP FKT].[PDOP], [dbo_PDTRP FKT].[PDSTAT], [dbo_PDTRP FKT].[PDDAT], [dbo_PDTRP FKT].[PD TESTS], [dbo_PDTRP FKT].TYPE, [dbo_PDTRP FKT].PDVEN, [dbo_PDTRP FKT].[PDFP] INTO Datequeryauto FROM [dbo_PDTRP FKT] GROUP BY [dbo_PDTRP FKT].[PDOP], [dbo_PDTRP FKT].[PDSTAT], [dbo_PDTRP FKT].[PDDAT], [dbo_PDTRP FKT].[PD TESTS], [dbo_PDTRP FKT].TYPE, [dbo_PDTRP FKT].PDVEN, [dbo_PDTRP FKT].[PDFP] HAVING ((([dbo_PDTRP FKT].[PDDAT]) Like [enter date] & "*"));
Comment