I would like to be able to get the format string from a DateTime string.
e.g.
"2012-12-08 15:00:00" => "yyyy-MM
You can try by writing the below code to get yyyy/dd/MM HH:mm format.
yyyy/dd/MM HH:mm
DateTimeFormatInfo df1 = new DateTimeFormatInfo(); df1.SortTimePattern();
It would give you same HH:mm format.
HH:mm