简体   繁体   English

通过提供当前日期的参数在ms访问中查询以提取数据

[英]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. DDATE是一个带有要输入日期的字段。

My query has to pull details for that day only, t1 is the table. 我的查询只需要提取当天的详细信息, t1是表格。

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? 我已经在MS Access 2012中制作了表格和表格并进行了查询?

Use Date() as long as there is no time element to DDate. 只要没有日期元素即可使用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]=DATE()

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM