public static IsoDateStringToDateTime ( string dateString ) : System.DateTime | ||
dateString | string | |
리턴 | System.DateTime |
public void TestIsoDateStringToDateTimeWithHoursMissingSeconds() { String dateString = "20070102.123400789"; DateTime testTime = DateUtils.IsoDateStringToDateTime(dateString); Assert.AreEqual(new DateTime(2007, 01, 02, 12, 34, 0, 789), testTime, "unexpected DateTime"); }
public void TestIsoDateStringToDateTime() { String dateString = "20070102"; DateTime testTime = DateUtils.IsoDateStringToDateTime(dateString); Assert.AreEqual(new DateTime(2007, 01, 02), testTime, "expect new DateTime of 2007/01/02"); }