Results 1 to 2 of 2
  1. #1
    Join Date
    Sep 2004

    Unanswered: DateRange Query give wrong results

    I am running some query with the following where clause

    where DateCreated BETWEEN '06/01/2004' AND '06/30/2004'

    It gives the records where DateCreated is of 2004-07-01 21:48:02.377

    the default language on the server is British English.

    Could anybody please tell me the reason why records from july are also coming
    Last edited by Bhavya; 09-01-04 at 02:11.

  2. #2
    Join Date
    Feb 2004
    In front of the computer
    Provided Answers: 54
    Because '06/30/2004' isn't a valid British date (no calendar has 30 months), I would guess that SQL Server assumes you want to compare string values. How 2004-07-01 got included is beyond me, but if you post the code that is causing the problem I might be able to offer more ideas.


Posting Permissions

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