Results 1 to 4 of 4

Thread: SQL statement for search date

  1. #1

    Thread Starter
    Member
    Join Date
    Aug 2000
    Location
    Penang, Malaysia
    Posts
    51
    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
    Addicted Member
    Join Date
    Sep 2000
    Posts
    138
    Use the WHERE clause. For example:

    SELECT * FROM tablename WHERE fieldname>=date1 AND fieldname<=date2

  3. #3
    Lively Member
    Join Date
    Oct 2000
    Location
    Chicago
    Posts
    97

    Wink Try this...

    Hi,
    In order to retrieve records based on dates in ACCESS you have to give # both sides of the date.Here is an Example

    select <field name> from <table name> where <date> between #01/01/1920# and #01/01/2000#

    Try this query and see whether it is working for you.This will work as i have tested it.

    Good Luck

    Anil

  4. #4
    Guest
    I gave an answer similar to anilgoje's in the ASP forum...gotta love it when the same question is posted in multiple forums!

    Paul

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