The default date-time format is what I would like to get.
My default (in windows) is: 24.12.2003 22:00:00
But with System.Globalization.CultureInfo.CurrentCulture I get american
values, also in my activeX:dateTimePicker I also get american values. I
would like to change it but I don't know where?
Thank you for your answer,
Simon
"Bill Styles" <no*****@nowhere.com> wrote in message
news:Oo**************@TK2MSFTNGP10.phx.gbl...
"simon" <si*********@stud-moderna.si> wrote in message
news:uH**************@tk2msftngp13.phx.gbl if I convert dt with this function:
dt = DateTime.ParseExact(string, "dd.MM.yyyy h:mm:ss",
System.Globalization.CultureInfo.CurrentCulture)
I get as a result:
dt =#12/24/2003 10:00:00 PM#
but I would like to get without PM and AM:
dt= #12/24/2003 22:00:00#
or in fact:
dt= #24.12.2003 22:00:00#
How are you examing dt? It sounds like you are simply seeing the default
date/time display format on your system. Try
dt.ToString("dd.MM.yyyy h:mm:ss")
--
C# newbie... posts are probably inaccurate, inelegant or both!