Click here to Skip to main content
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
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...
No downloads associated with this content

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

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

Share

About the Author

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

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