Mallik Raghu

Mallik Raghu

  • NA
  • 24
  • 0

String to shortdate time in asp.net 2.0

Mar 10 2008 9:05 AM

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)