I would highly recommend using a parameterized query, but for the sake of correcting your example, see the code below. You do not need to convert your source column to a varchar for the comparison to work - SQL Server will convert the date strings to datetime
// Declare date variables
DateTime startDate, endDate;
// Try parsing each date (avoids exceptions)
DateTime.TryParse(
TBContactSearchDateStart.Text,
System.Globalization.CultureInfo.CurrentCulture.DateTimeFormat,
Globalization.DateTimeStyles.None,
out startDate);
DateTime.TryParse(
TBContactSearchDateEnd.Text,
System.Globalization.CultureInfo.CurrentCulture.DateTimeFormat,
Globalization.DateTimeStyles.None,
out endDate);
if (startDate > DateTime.MinValue && endDate > DateTime.MinValue)
{
// Save query time by NOT converting the source column
strWhere += "AND ContactCreateDate BETWEEN '" +
startDate.ToShortDateString() + "' AND '" +
endDate.ToShortDateString() + "'";
}