Page 1 of 1

Working with SQL Server Date/Time Variables

PostPosted: Wed Jul 19, 2006 12:06 pm
by stephen
Working with SQL Server Date/Time Variables: Part Three - Searching for Particular Date Values and Ranges
By Gregory A. Larsen

I found the above article very helpful, in making a SELECT query to select records from a database using a user specied date.
http://www.databasejournal.com/features/mssql/article.php/10894_2209321_1

in particular I used the type of WHERE clause from this query in my application.

Code: Select all
SELECT * FROM DATE_SAMPLE WHERE
CONVERT(CHAR(10),SAMPLE_DATE,121) = '2003-04-09'