1
Answer

String to shortdate time in asp.net 2.0

Mallik Raghu

Mallik Raghu

16y
2.5k
1

dear all,

i am searching for a date in sqlserver in asp.net 2.0.

string curdate = DateTime.Now.ToShortDateString();//03/10/2008
                     
SqlDataSource2.SelectCommand = "Select * from Expenditure_Det where Exp_Date >= '"+curdate +"'";--Problem in casting a string to datetime.

how to convert curdate to a shortdate again to 03/10/2008 for searching in a table...

AMR


Answers (1)