Results 1 to 5 of 5

Thread: SQL statament to search date

  1. #1

    Thread Starter
    Member
    Join Date
    Aug 2000
    Location
    Penang, Malaysia
    Posts
    51

    Exclamation

    Hi,
    i faced problem to retrieve a certain data from database(access 97). I only want to display a certain record from a date to another date. What SQL statement should i put?
    hope u guys can help me, thanks.

  2. #2
    Guest
    You could try something like:

    SELECT * FROM TableName WHERE DateField BETWEEN #Date1# AND #Date2#


    Paul

  3. #3
    Frenzied Member monte96's Avatar
    Join Date
    Sep 2000
    Location
    Somewhere in AZ
    Posts
    1,379
    select * from table where datefield is between #FromDate# and #ToDate#

    for instance, from 1/1/2000 to 6/30/2000:

    select * from table where datefield is between #1/1/2000# and #6/30/2000#
    oOOo--oOOo
    __/\/\onte96
    oOOo--oOOo
    Senior Programmer/Analyst
    MCP
    [email protected]
    [email protected]


    Your results may vary.. some restrictions may apply.. pricing and participation may vary.. not available in all states.. professional driver closed course..quantities limited..

  4. #4
    Guest
    We're both wasting our time, monte96. This question was posted and already answered in the general forum. Gotta love it.

    Paul

  5. #5
    Frenzied Member monte96's Avatar
    Join Date
    Sep 2000
    Location
    Somewhere in AZ
    Posts
    1,379
    That is my pet peeve of the week. People who post their question multiple times in multple places, sometimes multiple times inthe same place. grr.
    oOOo--oOOo
    __/\/\onte96
    oOOo--oOOo
    Senior Programmer/Analyst
    MCP
    [email protected]
    [email protected]


    Your results may vary.. some restrictions may apply.. pricing and participation may vary.. not available in all states.. professional driver closed course..quantities limited..

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width