I use asp.net, I have a string format "01/29/2016". How I can format this string to "29/01/2016" output?. Because that value will be processed on report filtering,
Thank You,
I use asp.net, I have a string format "01/29/2016". How I can format this string to "29/01/2016" output?. Because that value will be processed on report filtering,
Thank You,
If it is a date value you can use Date.toString (dd/MM/yyyy) If not do a convertion of the string beforehand with DateTime.Parse (string)
DateTime.ParseExact (myString, "d", CultureInfo.InvariantCulture).ToString (@"dd/MM/yyyy");
This should do the trick for you
First convert your string format to date time. use following
DateTime YourDate= DateTime.ParseExact(
"01/29/2016",
"MM/dd/yyyy",
CultureInfo.InvariantCulture);
And then convert this date time to your required format.
string myDateString = YourDate.ToString("dd/MM/yyyy");