Update
I want to show the date time value in 24 hour format for the UK or USA depending on the current culture, using the general method.
The code below (NOT a valid code, just for the question):
var dt = new DateTime(2011, 4, 15, 17, 50, 40);
Console.WriteLine(dt.ToString("d", new CultureInfo("en-us")) + " "
+ dt.ToString("H:mm:ss", new CultureInfo("en-us")));
Console.WriteLine(dt.ToString("G", new CultureInfo("en-gb")));
The result is below:
4 /15/2011 17:50:40
15/04/2011 17:50:40
It is displayed normally.
Is there a better way to display time without using "H: mm: ss". Please note that The G for USA displays PM, which I don't want.
In month 4 for the US, not 04, there is a way to show it in 04 . .
Update
Below I want, ideally, using the general method:
US: 04/15/2011 17:50:40
United Kingdom: 04/15/2011 17:50:40
source