Working with SQL Server Date/Time Variables

Working with SQL Server Date/Time Variables

Postby stephen » Wed Jul 19, 2006 12:06 pm

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'
stephen
 
Posts: 507
Joined: Thu Feb 09, 2006 9:37 am
Location: Brisbane

Return to SQL Server Help

Who is online

Users browsing this forum: No registered users and 2 guests

cron