HomeActive Query BuilderSelect based on DateTime Fields

Select based on DateTime Fields

I need to be able to select based on a datetime field. In SQL Server 2005 I would do something like

SELECT Name,Number, DateStamp
FROM Parameters
WHERE (CONVERT(datetime, CONVERT(CHAR(10), DateStamp, 103), 103) = CONVERT(DATETIME, '2008-04-25 00:00:00', 102))

This would then return all people that were added on a certain date ignoring the time part of the date. How would I acheive this using active query builder .net edition I have tried adding criteria within the querybuilder like above with no joy. Is this possible, maybe there is a better way or something (hopefully).

Many Thanks

Simon Milne | email
April 6 2009, 08:28 AM
Dear Simon,

You should place the left part of expression to the Expression column and the right part to appropriate Criteria column.

Please don't forget to set MS SQL Syntax provider to get your expressions parsed well.
Sergey Smagin | email
18 hours, 36 mins since original post
This topic is closed