datetime [modified]
-
how i will change windows date time format? It should change the system's date time format too. -- modified at 5:39 Wednesday 14th February, 2007
-
how i will change windows date time format? It should change the system's date time format too. -- modified at 5:39 Wednesday 14th February, 2007
Format Info
DateTime objDate = DateTime.Now; String strFormatedDate = objDate.ToString("yyyy-mm-dd HH:mm:ss");
Edit: Wrong topic? OS/SysAdmin Anyway you can change the windows date time format in Start->Configuration Screen->Languagesettings There you can change all currency and formats... -- modified at 5:41 Wednesday 14th February, 2007 -
how i will change windows date time format? It should change the system's date time format too. -- modified at 5:39 Wednesday 14th February, 2007
Check the registry key in regedit: HKEY_CURRENT_USER\Control Panel\International Here are all the windows format settings stored. To edit this value's from within your program you have to use the Microsoft.Win32.Registry class. PS. When you want to edit/update an value you need to use the method CreateSubKey and not OpenSubKey This code will change the long date time representation of windows to DayName DayOfWeek MonthName 4-digit Year:
RegistryKey objReg = Registry.CurrentUser.CreateSubKey(@"\Control Panel\International"); objReg.SetValue("sLongDate", "dddd d MMMM yyyy");
Hope this is usefull...