Querying Access 2000 Date/Time field type

Results 1 to 3 of 3

Thread: Querying Access 2000 Date/Time field type

  1. #1
    Papa Zito Guest

    Default Querying Access 2000 Date/Time field type

    Can it be done? How do you do it?<BR><BR>I tried making it a text field, which kinda sorta worked, but the dates that are pulled don&#039t match the criteria exactly.

  2. #2
    Join Date
    Dec 1969

    Default RE: Querying Access 2000 Date/Time field type

    You should be able to query it like any other field. For example if you have a field called CurrentDate in your recordset you could have this line of code.<BR><BR>Response.write("The current date is " & rst("CurrentDate").<BR>The syntax is kind of wierd if you are using a date field in a query string. Lets say that you are usiing a date criteria in a form and wnat to look up records for a certain date.<BR>You could do this:<BR>CurrentDate = "Request("Date")<BR>rst.Open "Select * from tblName where CurrentDate =#" & CurrentDate & "#" ,DBConn,2,2<BR><BR><BR>Hope this helps.<BR><BR>Dennis Branson<BR><BR>P.S. the syntax is different if you want to use a date criteria from a SQLdatabase.<BR>

  3. #3
    Papa Zito Guest

    Default And the crowd goes wild!

    AHA!! The # symbol! Brilliant! Perfect! Marvelous!<BR><BR>I&#039m a little excited.<BR><BR>Thank you mucho mucho!

Posting Permissions

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