DateTime dt = Convert.ToDateTime(txtldate.Text.Trim()); DateTime dt1= Convert.ToDateTime(dt.ToShortDateString());// txtlday.Text = dt1.DayOfWeek.ToString();
The code I gave you does fine conversion
DateTime ddate = Convert.ToDateTime("14/12/2012".Replace("/", "-"));
So this means the error is somewhere else.
Ask a new question with code and point line that is throwing error
© COPYRIGHT 2025 ASPSnippets.com ALL RIGHTS RESERVED.