Пример #1
0
        public void HandleDateParam()
        {
            var p1 = new DateValue(new DateTimeOffset(1972, 11, 30, 15, 20, 49, TimeSpan.Zero));
            Assert.AreEqual("1972-11-30T15:20:49+00:00", p1.ToString());

            var p2 = DateValue.Parse("1972-11-30T18:45:36");
            Assert.AreEqual("1972-11-30T18:45:36", p2.ToString());

            var crit = Criterium.Parse("paramX=1972-11-30");
            var p3 = ((UntypedValue)crit.Operand).AsDateValue();
            Assert.AreEqual("1972-11-30", p3.Value);
        }
Пример #2
0
 public DateValue AsDateValue()
 {
     return(DateValue.Parse(Value));
 }