I am trying to get the system Date Format .
The available code : CultureInfo.CurrentCulture.DateTimeFormat.ShortDatePattern gives the format as MM-dd-yyyy always .
I am trying to figure out how to get the expected result .
Trying the below specified solution :
- Fetching the system date from System tray
2)Converting the date string to a proper date variable and using .GetDateTimeFormat method
This solution gives me error as the string to date conversion is throwing error .(String was not recognized as valid date)
Please suggest .
Thanks and Regards