View Complete Post
I am using a text box which captures the date from the datepicker and displays in dd/MM/yyyy format in asp.net using C#
When i try to pass this text box value into the DatTime variable i am getting the error as
"String was not recognized as a valid DateTime. "
my code goes like this
i tried to use Conver.ToDateTime() function but the same error is croping up..
Can any one plz suggest me on this.....Thnks in advance
I'm about to go NUTS :)
I have 2 CalendarExtenders on page. And I want to show the date that I get from SQL SEVER:
select -> SELECT convert(datetime, ÃÂ begin) as Begin, convert(datetime, end) as End FROM Table
The date field, on base,ÃÂ is a char(8) ÃÂ and the record is like YYYYMMDD. That's why I convert it to datetime.
But, on code behind when I do this :
CalendarExtender1.SelectedDate = DateTime.Parse(objDataEvento.Rows(0)(2)) CalendarExtender2.SelectedDate = DateTime.Parse(objDataEvento.Rows(0)(3))ÃÂ
Depend of the date, It's showing minus 1 day on page.
Like: If, on base, the date is 08/12/2010, on page it's showing 07/12/2010.
WHYYYYYYYYYYYY ??????????????? ÃÂ