Click here to Skip to main content
12,881,367 members (28,643 online)
Click here to Skip to main content

Tagged as


10 bookmarked
Posted 2 Dec 2009

Accurate DATETIME Range Searching in SQL Server

, 9 Dec 2009 CPOL
When searching between datetimes in SQL(or SQL in a Stored Proc) we can't just do:select * from where CreateTime >= @DateFrom and CreateTime <= @DateToIf your search is date inclusive and you're not concerned with time, which most users aren't, then you need to add a little extra...



Compare Revision Minor Date Status Editor
3 - publicly available No 9-Dec-09 5:03 Available Chris Maunder
2 No 9-Dec-09 5:03 Composing Sean Ewington
1 No 3-Dec-09 10:54 Composing Mark Graham


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

Mark Graham
Web Developer Currently working on projects for May Gurney
United Kingdom United Kingdom
Areas of expertise: c#,, design patterns, GUI useability/layout

You may also be interested in...

Permalink | Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.170422.1 | Last Updated 9 Dec 2009
Article Copyright 2009 by Mark Graham
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid