
Sumar fechas en Firebird
#1
Escrito 04 octubre 2011 - 10:23
Gracias
#2
Escrito 04 octubre 2011 - 10:40
http://www.firebirds...20-extract.html
ó
Checa este set de UDF's:
http://freeadhocudf...._eng_datum.html
#3
Escrito 04 octubre 2011 - 11:28
Por cierto, ten en cuenta que sumar horas puede darte dias... 12h+12h = 1 día... o más, así que ojo a esto, puedes obviar los dias o sumarlos como +24h, pero el resultado cambia y puede no "caberte" en un Time si quieres obtener cosas tipo 72h.
#5
Escrito 04 octubre 2011 - 02:29
#6
Escrito 04 octubre 2011 - 03:02
Espero te sirva =) http://www.firebirds...nc-dateadd.html
Esta funcion ya la vi, pero el asunto es que tengo dos parametros:
Hora1 y Hora2, el resultado seria: Hora3 := Hora1 + Hora2;
No supe como configurarla
#7
Escrito 04 octubre 2011 - 07:44
Sería algo así como
Espero te sirva =) http://www.firebirds...nc-dateadd.html
Esta funcion ya la vi, pero el asunto es que tengo dos parametros:
Hora1 y Hora2, el resultado seria: Hora3 := Hora1 + Hora2;
No supe como configurarla
DateAdd(HoraDos To HoraUno);
Así horauno queda con lo de ella mas horados
#8
Escrito 05 octubre 2011 - 07:17
OPERAND 1 OPERATOR OPERAND 2 RESULT
DATE + TIME TIMESTAMP (arithmetic concatenation)
DATE + Numeric value n‡ Advances DATE by n wholedays (ignoring fraction of n ifpresent)
TIME + DATE TIMESTAMP (arithmetic concatenation)
TIME + Numeric value n‡ Advances TIME by n seconds †
TIMESTAMP + Numeric value n‡ Advances TIMESTAMP by the whole-number part of n days
plus the fraction part of n (if present) as a fraction of the
number of thousandths of
seconds in a day (8.64 × 10 a la 8)
DATE – DATE DECIMAL(9,0) days of interval
DATE – Numeric value n‡ Reduces DATE by n days(ignoring fraction of n if present)
TIME – TIME DECIMAL(9,4) seconds ofinterval
TIME – Numeric value n‡ Reduces TIME by n seconds †
TIMESTAMP – TIMESTAMP DECIMAL(18,9) days and part-day of interval
TIMESTAMP – Numeric value n‡ Reduces TIMESTAMP by the whole-number part of n days
plus the fraction part of n (if
present) as a fraction of the
number of thousandths of
seconds in a day (8.64 × 10 a la 8)
† If necessary, repeats (result=modulo(result, (24 * 60 * 60))) until resultant day-part is eliminated.
‡ For the dialect 3 DATE type, n is an integer representing days. For TIMESTAMP and dialect 1
DATE types, n can be a numeric representing days to the left of the decimal point and a part
day to the right. For the TIME type, n is an integer representing seconds.
#9
Escrito 08 octubre 2011 - 12:51