ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Today's Date in MS Query (https://www.excelbanter.com/excel-discussion-misc-queries/138111-todays-date-ms-query.html)

Lambi000

Today's Date in MS Query
 
How do I query on today's date. I apparently have the wrong syntax because
I'm constantly getting error messages.

In the criteria, I have =Today(). What are the exact characters I should be
putting in the criteria box to get todays date only? I do not want the user
typing in the date every time he refreshes data.

Thanks for the help.

ExcelBanter AI

Answer: Today's Date in MS Query
 
To query on today's date in MS Query, follow these steps:
  1. Open MS Query and select the data source you want to query from.
  2. In the Query Wizard, select the table or tables you want to query and add them to the query.
  3. In the Criteria box for the date field you want to filter on, enter the following syntax:
    =DATEVALUE(TODAY())
    This will filter the data to show only records where the date field is equal to or greater than today's date.
  4. Click Next and follow the remaining steps in the Query Wizard to finish creating your query.

Note that the syntax for querying on today's date may vary depending on the data source you are using. If you continue to receive error messages, you may need to consult the documentation for your specific data source or seek assistance from a technical support professional.

Lambi000

Today's Date in MS Query
 
Hi Paul,
I'm using Excel. I have external data and I'm filtering it with MS Query.

I tried Date() and it didn't work. Thanks!

"Paul B" wrote:

Lambi000, this is an Excel newsgroup not Access, but try this and see if it
will work Date()
--
Paul B
Always backup your data before trying something new
Please post any response to the newsgroups so others can benefit from it
Feedback on answers is always appreciated!
Using Excel 2002 & 2003

"Lambi000" wrote in message
...
How do I query on today's date. I apparently have the wrong syntax
because
I'm constantly getting error messages.

In the criteria, I have =Today(). What are the exact characters I should
be
putting in the criteria box to get todays date only? I do not want the
user
typing in the date every time he refreshes data.

Thanks for the help.





Paul B

Today's Date in MS Query
 
Lambi000, this is an Excel newsgroup not Access, but try this and see if it
will work Date()
--
Paul B
Always backup your data before trying something new
Please post any response to the newsgroups so others can benefit from it
Feedback on answers is always appreciated!
Using Excel 2002 & 2003

"Lambi000" wrote in message
...
How do I query on today's date. I apparently have the wrong syntax
because
I'm constantly getting error messages.

In the criteria, I have =Today(). What are the exact characters I should
be
putting in the criteria box to get todays date only? I do not want the
user
typing in the date every time he refreshes data.

Thanks for the help.




Peo Sjoblom

Today's Date in MS Query
 
There is nothing built in, here's from an answer by Debra Dalgleish to a
similar question

http://tinyurl.com/2nmocy


--
Regards,

Peo Sjoblom


"Lambi000" wrote in message
...
Hi Paul,
I'm using Excel. I have external data and I'm filtering it with MS Query.

I tried Date() and it didn't work. Thanks!

"Paul B" wrote:

Lambi000, this is an Excel newsgroup not Access, but try this and see if
it
will work Date()
--
Paul B
Always backup your data before trying something new
Please post any response to the newsgroups so others can benefit from it
Feedback on answers is always appreciated!
Using Excel 2002 & 2003

"Lambi000" wrote in message
...
How do I query on today's date. I apparently have the wrong syntax
because
I'm constantly getting error messages.

In the criteria, I have =Today(). What are the exact characters I
should
be
putting in the criteria box to get todays date only? I do not want the
user
typing in the date every time he refreshes data.

Thanks for the help.








All times are GMT +1. The time now is 10:02 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com