示例#1
0
        /// <summary>Devuelve la diferencia entre las dos fechas indicadas</summary>
        public static Expression DateDiff(dbTim datepart, Expression startDate, Expression endDate)
        {
            Expression expr = new Expression(datepart);

            expr = expr.Operate(dbOpe.Comma, startDate);
            expr = expr.Operate(dbOpe.Comma, endDate);
            return(expr.Fun(dbFun.DateDiff));
        }
示例#2
0
        /// <summary>Adds a quantity to a component of a date</summary>
        public static Expression DateAdd(dbTim datepart, Expression quantity, Expression targetDate)
        {
            Expression expr = new Expression(datepart);

            expr = expr.Operate(dbOpe.Comma, quantity);
            expr = expr.Operate(dbOpe.Comma, targetDate);
            return(expr.Fun(dbFun.DateAdd));
        }
示例#3
0
 private Expression(dbTim datepart)
 {
     particles.Add(new Particle(dbOpe.NoOp, datepart.ToString().ToUpper()));
 }