Suji D

Suji D

  • NA
  • 23
  • 7.6k

use of SUBSTRING function in WHERE clause using SQL SERVER 8

Jul 9 2015 8:16 AM
Hi all,
   Good Day!  I am using SQL SERVER 2008 and Microsoft Visual Studio 2008.  In the i have a database table which contains a column for data and time as string. in that column i have both date and time. In my application i have to select date and based on that date i have to get the data from table and show in data grid view control. So i want to compare only with date. 
And i referred the below link. But it is not working for me.
 
 I tried this query, But not working for me.
SELECT * FROM tAerator WHERE SUBSTRING(fldAEdnt,0,10)='07-07-2015' 
 
 can you please give me way to solve this problem.
 
 
Thanks & Regards
Suji D 

Answers (3)