Date problems

Results 1 to 3 of 3

Thread: Date problems

  1. #1
    Join Date
    Dec 1969

    Default Date problems

    I am upgrading a web site by adding a query report in which I am trying to return the values between two dates specified by the user in a form.<BR><BR>Unfortunately the dates on this site are all formatted to dd/mm/yyyy and I am finding comparing these dates in SQL a major headache<BR><BR>I am currently using the following SQL:<BR>Select query.* from query where received between&#039;03/10/2002&#039; and &#039;13/12/2002&#039;<BR><BR>This does not return the records it should<BR><BR>I have tried a select Cast to put these in a universal date format but I am using Access and this expression did not work correctly, not sure if it was my syntax or i access does not support the Cast command<BR><BR>Can anybody please help me with this

  2. #2
    Join Date
    Dec 1969

    Default RE: Date problems

    Access uses # marks around dates NOT &#039; marks.<BR><BR>Try this:<BR><BR>Sql = "Select query.* from query where received between #" & FormatDateTime("03/10/2002"),1) & "# and #" & FormatDateTime("13/12/2002",1) & "#"<BR>

  3. #3
    Join Date
    Dec 1969

    Default ** CROSSPOST

    Sorry Eddie, didn&#039;t see it in here until you answered it...<BR><BR>In Q&A too.<BR><BR>Craig.

Posting Permissions

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