ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Using Query to return data from SQL database (https://www.excelbanter.com/excel-programming/420453-using-query-return-data-sql-database.html)

DOOGIE

Using Query to return data from SQL database
 
I am using an Excel spreadsheet to query a SQL database for information that
is stored by various dates. I only want to return information that was stored
in the SQL database within the last 24 hours. However, I run into a snag when
I am using the query wizard within Excel. When I get to the point where the
wizard asks if I want to filter the data I am retrieving, I enter that I want
the date field filtered by greater than or equal to "Today()-1". However,
Query does not recognize the Today() function. What should I enter to filter
my data by the date less than or equal to the last 24 hours or 1 day?


All times are GMT +1. The time now is 01:22 PM.

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