Hola!.
¿ Está mal traducido al español la ayuda de DateDiff ?.
Veo...fecha mayor y fecha menor.
Citar:
Cantidad = DateDiff ( Fecha1 , Fecha2 , Periodo )
Citar:
Fecha1 es la fecha mayor.
Fecha2 es la fecha menor.
Periodo es el tipo de periodo: año, mes, día, semana...
Si lo hago de esa forma, el resultado me sale negativo.
Por ejemplo, tengo dos valuebox:
dias = DateDiff(vlbFeFin.Value, vlbFeIni.Value, gb.day)
Y para fecha1 (vlbFeFin.Value) uso: 01/01/2016
Y para fecha2 (vlbFeIni.Value) uso: 01/01/2017
Con lo que voy a obtener -366...ya que 2016 es "bisiesto!"
En la ayuda en inglés podemos ver:
Citar:
Count = DateDiff ( Date1 AS Date , Date2 AS Date , Period AS Integer ) AS Integer
Returns the number of periods between two dates.
Date1 is the start date.
Date2 is the end date.
Period is the kind of period: year, month, day, week...
Por lo menos yo, entiendo mejor la ayuda en inglés que en español...
Fecha mayor...suponemos la ultima..o no ?.
Saludos
===================
Gambas Básico
"No es un bug, es una característica no documentada"