trimTime() public static méthode

Removes the time portion (if present) of a date/time string of expected format.
NOTE: this function doesn't check for well-formatted-ness of timestamp argument. If you need to check, use the isWellFormed...() functions
public static trimTime ( string timestamp ) : string
timestamp string yyyyMMdd.HHmmss or yyyyMMdd
Résultat string
        public void TestTrimTime_SeparatorAndTimeOnly()
        {
            string DATE_TIME = ".123456";

            Assert.AreEqual("", DateUtils.trimTime(DATE_TIME));
        }
        public void TestTrimTime_NormalDateOnly()
        {
            string DATE_TIME = "20091123";

            Assert.AreEqual("20091123", DateUtils.trimTime(DATE_TIME));
        }