Hi all,
I want to filter today's data from database table by sql query but it's filter nothing
i use
SELECT *
FROM Table1
WHERE Date = Date();
please help
Regards
manish
Hi all,
I want to filter today's data from database table by sql query but it's filter nothing
i use
SELECT *
FROM Table1
WHERE Date = Date();
please help
Regards
manish
"Date" is an extremely poor field name for several reasons.
It is a reserved word, a built in function and not very descriptive. "Date" of what? HireDate? TermDate? DateOfBirth?
If you MUST use "Date" as the field name, try
Code:SELECT * FROM Table1 WHERE [Date] = Date();
The value of date (in Date type field) doesn't depend on format you use. A date in Access, Excel, or MS SQL is an integer, which counts days from 01.01.1900. P.e. today's date (17.12.2017) is 43086.
And datetime 17.12.2017 20:30 is really a double 43086.9375 (i.e. hours and minutes are values between 0 and 1).