C# .NET - why DateTime.ParseExact conversion varying in format in differenct mechine environment

Asked By mani on 10-Apr-13 02:04 AM
i am working on  DateTime.ParseExact conversion..
when i working one machine its convert datetime as  "4/9/2013 12:00AM"

but working another machine its convert datetime as "04/09/2013 12:00AM"

why these kind of variation in formats...

any help please??
Robbe Morris replied to mani on 10-Apr-13 07:43 AM
possibly different system regional settings.  Check the current thread's CultureInfo.

That said, as long as it gets into a DateTime with the right value (as it does in this case), you can use the .ToString("format goes here") method to display what you want.