cgtalk
July 27th, 2008, 02:33 PM
hi
is there any good way that i can use to compare:
a datetime value stored in sql server 2005 table and datetime value that has been created in c#
format of datetime in sql server 2005: 4/22/2008 12:00:00 AM
format of datetime in c#: 4/22/2008 12:00:00 AM
in other words, is this query legal becouse i got an internal error when it's beign executed
"select A, B, C from TABLE1 where d=(select c from table2 where r='" + v1 + "' and rr='" + v2 + "') and Date>="+fromdate+" and Date<="+todate+"";
is there any good way that i can use to compare:
a datetime value stored in sql server 2005 table and datetime value that has been created in c#
format of datetime in sql server 2005: 4/22/2008 12:00:00 AM
format of datetime in c#: 4/22/2008 12:00:00 AM
in other words, is this query legal becouse i got an internal error when it's beign executed
"select A, B, C from TABLE1 where d=(select c from table2 where r='" + v1 + "' and rr='" + v2 + "') and Date>="+fromdate+" and Date<="+todate+"";