Issue with WebToolBox.DatePicker...
-
hi guys im actually working on C# web application on VS2003(Version 1.1) in my web page i have a date picker now the date gets stored in a string this way:
string FrmDt=DtP_frm.Text.Replace("/","");
so the string stored here is in format like this --> 12042010, with this string i retrieve my records from database with search query. but in the database i have to pass this string as --> 20100412 which is yyyymmdd format... How do i achieve this... Any advise is appreciated... Thanx in advance, Tash
-
hi guys im actually working on C# web application on VS2003(Version 1.1) in my web page i have a date picker now the date gets stored in a string this way:
string FrmDt=DtP_frm.Text.Replace("/","");
so the string stored here is in format like this --> 12042010, with this string i retrieve my records from database with search query. but in the database i have to pass this string as --> 20100412 which is yyyymmdd format... How do i achieve this... Any advise is appreciated... Thanx in advance, Tash
<> wrote:
string FrmDt=DtP_frm.Text.Replace("/","");
In here, before replacing the '/', convert into the yyyymmdd format that you need and then replace the '/', pass on as search parameter to Database. Like:
String tempDate = Convert.ToDateTime(DtP_frm.Text).ToString("yyyy/MM/dd");
Now use this tempDate for your manipulation of removing the '/' and passing to DB.