query on date (access db)

Results 1 to 3 of 3

Thread: query on date (access db)

  1. #1
    Isabelle Guest

    Default query on date (access db)

    I&#039ve made an eventpage for a country.<BR>How can I query on date( for example, all records between date a and date b???<BR><BR>Thanks

  2. #2
    Join Date
    Dec 1969

    Default RE: query on date (access db)

    Assuming you are using Access, as you&#039ve said in your title, you could do it in a number of different ways. Up to you which you pick. I&#039ll only show the SQL command needed, you&#039ll have to use this with ASP to query the database. There are lots of articles about how to do this about.<BR><BR>Try this :<BR><BR>SELECT *<BR>FROM MyTable<BR>WHERE MyDate BETWEEN #12/06/98# AND #25/12/99#<BR><BR>or you could replace the last line with this instead :<BR><BR>WHERE MyDate > #12/06/98# AND MyDate &#060; #12/06/99#<BR><BR>You couls add this next line at the end of the statement to sort the results :<BR><BR>ORDER BY MyDate<BR><BR>Remember that the format for Access Dates in Queries is MM/DD/YY<BR><BR>Hope that helps<BR><BR>Pete<BR><BR>

  3. #3
    Isabelle Guest

    Default RE: query on date (access db) - Thanks

    Thanks a lot Pete!

Posting Permissions

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