Convert Date Format MM/dd/yyyy To dd-MM-yyyy In Asp.net



            string dat = txtdate.Text;
            string strdat = DateTime.ParseExact(dat,"dd-MM-yyyy",null).ToString("MM/dd/yyyy");
            DateTime dt1 = Convert.ToDateTime(strdat);

Comments

Popular posts from this blog

Display Canvasjs Line Chart using Data from Database

What are the SOLID principles, and why are they important

Write Text in Notepad files Using Asp.net