Hello!
I manage to do this and works. But it doest not work with minutes.
If DAY_DIFFERENCE2(BO.DEPATURE,BO.ARRIBAL)< 1
Then
BO.Demoras=HOURS(BO.ARRIBAL-BO.DEPATURE)
else
BO.Demoras=HOURS(BO.ARRIBAL-BO.DEPATURE)+(DAY_DIFFERENCE2(BO.DEPATURE,BO.ARRIBAL)*24)
It works, but just for the hours. I'll work more to get it done.
Thanks!