>- see footer for list info -<
Hi,

The issue could be that the date stored in the datetime files has a time
associated with it, which means that its not the as the date your comparing.

I know on Oracle SQL you can do...

where trunc(tblUserDetails.RecordDate) BETWEEN #CreateODBCDate(StartDate)#
and  #CreateODBCDate(EndDate)#

Can't remeber the easy way to dot his in SQL Server.....you can use convert
through.

Mike

2009/6/24 Paul Swingewood <[email protected]>

> >- see footer for list info -<
>
> I have a query which finds records between two dates. All works fine.
>
>
>
>
>
> WHERE (tblUserDetails.RecordDate BETWEEN CONVERT(DATETIME, '#StartDate#',
> 103)
>  AND CONVERT(DATETIME, '#EndDate#', 103))
>
>
>
>
> However if I want to find a record on a date (Start and end date the same)
> it doesn't work.
>
> So I added
>
>
>
> WHERE (tblUserDetails.RecordDate BETWEEN CONVERT(DATETIME, '#StartDate#',
> 103)
>  AND CONVERT(DATETIME, '#EndDate#', 103))
>  OR (tblUserDetails.RecordDate = CONVERT(DATETIME, '#StartDate#', 103))
>
>
>
> This doesn't work.
>
>
>
> How do I check for a record with say start 24/06/09 and end 24/06/09 when
> the record is stored as 24/06/09
>
>
>
> Does that make sense? - I think you get the idea
>
>
>
> Regards - Paul
> _______________________________________________
>
> For details on ALL mailing lists and for joining or leaving lists, go to
> http://list.cfdeveloper.co.uk/mailman/listinfo
>
> --
> CFDeveloper Sponsors:-
> >- cfdeveloper Hosting provided by www.cfmxhosting.co.uk -<
> >- Lists hosted by www.Gradwell.com -<
> >- CFdeveloper is run by Russ Michaels, feel free to volunteer your help -<
>
_______________________________________________

For details on ALL mailing lists and for joining or leaving lists, go to 
http://list.cfdeveloper.co.uk/mailman/listinfo

--
CFDeveloper Sponsors:-
>- cfdeveloper Hosting provided by www.cfmxhosting.co.uk -<
>- Lists hosted by www.Gradwell.com -<
>- CFdeveloper is run by Russ Michaels, feel free to volunteer your help -<

Reply via email to