CrashOverride
CrashOverride

Reputation: 338

query in ms access for pulling data by giving parameters for current date

SELECT t1.[Ticket Number], t1.[Time Received], t1.[Time Read], t1.[Time Replied], t1.[Replied By], t1.[Called Customer?], t1.[Call Duration], t1.[Email Duration], t1.[General Issue]
FROM t1
WHERE [DDATE]=[GETDATE()];

Here DDATE is a field with dates that will be entered.

My query has to pull details for that day only, t1 is the table.

So how can i make this query to take todays date as parameter automatically?

I have made forms and tables and query in MS Access 2012?

Upvotes: 1

Views: 347

Answers (1)

Fionnuala
Fionnuala

Reputation: 91376

Use Date() as long as there is no time element to DDate.

SELECT t1.[Ticket Number], t1.[Time Received], 
   t1.[Time Read], t1.[Time Replied], 
   t1.[Replied By], t1.[Called Customer?], 
   t1.[Call Duration], t1.[Email Duration], t1.[General Issue] 
FROM t1 
WHERE [DDATE]=DATE()

Upvotes: 1

Related Questions