My system date format is dd-MM-yyyy(20-10-2012) and I\'m getting the date and using separator to split the date, month and year. I need to convert date format (dd/MM/yyyy) w
Here is what you are looking for:
String sDate = DateTime.Now.ToString();
DateTime datevalue = (Convert.ToDateTime(sDate.ToString()));
String dy = datevalue.Day.ToString();
String mn = datevalue.Month.ToString();
String yy = datevalue.Year.ToString();
OR
Alternatively, you can use split function to split string date into day, month and year here.
Hope, it will helps you... Cheers. !!