Ejemplo n.º 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));
        }
Ejemplo n.º 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));
        }
Ejemplo n.º 3
0
 private Expression(dbTim datepart)
 {
     particles.Add(new Particle(dbOpe.NoOp, datepart.ToString().ToUpper()));
 }