Buenas noches.
Tengo un campo calculado:
CAST( ( “Horarios”.“FechaEntrada” || ’ ’ || ‘22:00:00’ ) AS TIMESTAMP ) “calculonocturnas”
En otro consulta quiero crear un campo que sume ocho horas a “calculonocturnas”.
He probado con DATEADD, con SUM y de todas las formas que he encontrado.
Este último sería el horario de fin de las nocturnas. De 22:00 a las 06:00 del día siguiente.
DATEADD (8, hours, “calculonocturnas”) “calculonocturnasFin”.
Con eso y no se cuantas variaciones no va.
Un saludo,
You are using Firebird, right?
"myTimestamp" + 1.0000000000000/3
should work. 8 hours will be 0.33333333333 days. More zeros will give better result for 8 hours.
DATEADD ( hour, 8, "myTimestamp" )
should also work.
Seems it isn’t part of the English documentation. Original for German documentation: Base Handbuch 24.2 (German)
Un saludo,
Robert
Thank you very much for the solution.
It is now working properly.
I don’t know why it didn’t before.
Maybe because of the position of hours and 8.
I found that solution in the Firebird documentation.
Best regards,