Results 1 to 4 of 4
  1. #1
    manissinha is offline Novice
    Windows 8 Access 2010 32bit
    Join Date
    Jul 2017
    Posts
    21

    how to filter today's data from access databse tabel by sql query

    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

  2. #2
    ssanfu is offline Master of Nothing
    Windows 7 32bit Access 2010 32bit
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    "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();

  3. #3
    manissinha is offline Novice
    Windows 8 Access 2010 32bit
    Join Date
    Jul 2017
    Posts
    21

  4. #4
    Join Date
    Apr 2017
    Posts
    1,679
    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).

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Entering data into to eh tabel the first time
    By Lou_Reed in forum Access
    Replies: 10
    Last Post: 05-17-2016, 01:33 PM
  2. Replies: 3
    Last Post: 05-07-2015, 05:37 AM
  3. Replies: 4
    Last Post: 01-20-2015, 08:26 AM
  4. Search Filter Databse HELP ASAP
    By JordanS98 in forum Access
    Replies: 2
    Last Post: 06-03-2014, 01:52 AM
  5. Replies: 5
    Last Post: 10-12-2012, 11:00 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums