What is Date/Time format in SQL string statements?

Tech-Archive recommends: Speed Up your PC by fixing your registry

From: SROSeaner (SROSeaner_at_discussions.microsoft.com)
Date: 06/23/04


Date: Wed, 23 Jun 2004 07:03:02 -0700

I am trying to search my access database by date, to determine who has first aid credentials and what date they received them.

I am building an SQL query string in VBA code, and can't figure out the format to use for date searching.

When I open a report from within VBA, the where clause contains the following:

FirstAid=20041212

And it returns no results in the report even though somebody in the db table has the date 12/12/2004. I have tried the where clause as follows with no results either:

FirstAid=12/12/2004

Please help!



Relevant Pages

  • Re: Crosstab query and report
    ... I download your example database called CrossTab.mdb. ... >> report I am using. ... It also contains some VBA code which I do understand. ... >> Duane, If I remove the where clause, the report runs great. ...
    (microsoft.public.access.reports)
  • RE: Export to Snapshot with parameters
    ... "Dale Fye" wrote: ... was passed thru WHERE clause, wich worked for previewing and printing to MS ... I run the report by either of 2 buttons with acPreview and acNormal VBA ... How can I fix the Macro or maybe put VBA code instead to export the report ...
    (microsoft.public.access.gettingstarted)
  • Re: What is Date/Time format in SQL string statements?
    ... > I am trying to search my access database by date, ... > I am building an SQL query string in VBA code, ... > And it returns no results in the report even though somebody in the db ... I have tried the where clause as follows ...
    (microsoft.public.access.queries)
  • Re: Report Parameters - no results
    ... Is it indicated in the correct spot of my WHERE clause? ... be able to use it for this particular report based on user needs. ... What else can I do to try to correct my sql? ... used with function in query expression" for my where clause. ...
    (microsoft.public.access.reports)
  • RE: Passing Qry as part of Rpt DoCmd.OpenReport
    ... You are, by your description, trying to filter the output of the report. ... If you create a string that is a Where Clause without the word Where, ... And yes my data query is plain vanillia with no where clause only a single ...
    (microsoft.public.access.reports)