Re: SQL Statement BETWEEN 2 Dates - Advice Please.
From: Aaron [SQL Server MVP] (ten.xoc_at_dnartreb.noraa)
Date: 08/11/04
- Next message: TomT: "Re: SQL Statement BETWEEN 2 Dates - Advice Please."
- Previous message: TomT: "SQL Statement BETWEEN 2 Dates - Advice Please."
- In reply to: TomT: "SQL Statement BETWEEN 2 Dates - Advice Please."
- Next in thread: TomT: "Re: SQL Statement BETWEEN 2 Dates - Advice Please."
- Reply: TomT: "Re: SQL Statement BETWEEN 2 Dates - Advice Please."
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 11 Aug 2004 16:00:02 -0400
Stop using ambiguous date formats! I can't tell if you mean January 8th or
August 1st, how do you expect the software to know?
WHERE IDate >= #2004-08-01# AND IDate < #2004-08-10#
-- http://www.aspfaq.com/ (Reverse address to reply.) "TomT" <tomt@adslweb.co.uk> wrote in message news:411a7a83$0$20243$cc9e4d1f@news-text.dial.pipex.com... > strList = "select * " _ > & "from tbltest "_ > & "WHERE user LIKE '%" & Replace(strSearch, "'", "''") & "%' AND ID < '2' > "_ > & "AND IDate Between #01/08/2004# AND #09/08/2004# " _ > & "order by CDATE(IDate)" > > This works but it shows all dates not just the ones between the 2 dates... > > The access MDB has the 'IDate' formated as Date/Time. > > How do I correct this ?? > > Thanks > >
- Next message: TomT: "Re: SQL Statement BETWEEN 2 Dates - Advice Please."
- Previous message: TomT: "SQL Statement BETWEEN 2 Dates - Advice Please."
- In reply to: TomT: "SQL Statement BETWEEN 2 Dates - Advice Please."
- Next in thread: TomT: "Re: SQL Statement BETWEEN 2 Dates - Advice Please."
- Reply: TomT: "Re: SQL Statement BETWEEN 2 Dates - Advice Please."
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|