I am trying to display the date on server in local system datetime format but it's taking the server datetime format. It's working fine when run in localhost but when ran in server, the format is MM/dd/yyyy (US format) irrespective of system datetime format. I have already tried these but no desired results
string DateTimeFormat = System.Globalization.CultureInfo.CurrentCulture.DateTimeFormat.ShortDatePattern
System.Threading.Thread threadForCulture = new System.Threading.Thread(delegate() { });
string DateTimeFormat = threadForCulture.CurrentCulture.DateTimeFormat.ShortDatePattern;
Is there any other method to achieve this?