Click here to Skip to main content
11,495,743 members (61,565 online)
Click here to Skip to main content
Add your own
alternative version

Tagged as

Accurate DATETIME Range Searching in SQL Server

, 9 Dec 2009 CPOL 12K 10
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 11:03 Available Chris Maunder
2 No 9-Dec-09 11:03 Composing Sean Ewington
1 No 3-Dec-09 16: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

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