How to get a record from 15/09/2010 to 25/09/2010

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Abdul Ahad
    New Member
    • Mar 2010
    • 1

    #1

    How to get a record from 15/09/2010 to 25/09/2010

    plz help, i want to get all record between this date as 15/09/2010 to end date 25/09/2010.

    when i am using between '15/09/2010' and '25/09/2010'
    then i am getting record from 15/09/2010 to 24/09/2010, i am not getting 25/09/2010 date record.
  • gpl
    New Member
    • Jul 2007
    • 152

    #2
    Hi
    The problem here is that SQL Server does not hold just dates, it records the time too

    so, 15/09/2010 is midnight at the start of 15/09/2010. Fine for the start period of a query, however for 25/09/2010, it is midnight at the start of 25/09/2010, which is the same as the end of the 24th, which is why you see the results that you get. Either ask for everything up to the beginning of the next day (26/09/2010) or add in the time (23:59:59)

    Comment

    • ck9663
      Recognized Expert Specialist
      • Jun 2007
      • 2878

      #3
      Here, read this...

      Good Luck!!!

      ~~ CK

      Comment

      Working...