次の英国の書式文字列を解析しようとしていDateTime
ます:24/01/2013 22:00
ただし、次のエラーが発生し続けます。
文字列は有効な DateTime として認識されませんでした。
CultureInfo.CurrentCulture
en-GB
正しい" " を返します
これが私のコードです
[TestMethod]
public void TestDateTimeParse()
{
DateTime tester = DateTime.ParseExact("24/01/2013 22:00", "d/M/yyyy hh:mm", CultureInfo.CurrentCulture);
int hours = tester.Hour;
int minutes = tester.Minute;
Assert.IsTrue(true);
}