varTime -> 13:00:00 Decimal -> 2,5and get the result:
varTime + Decimal -> 15:30:00I tried making a time var (varTime2) with the decimal and execute:
varTime := varTime + varTime2;but only subtraction is allowed (compiler error) between time variables, not addition!!
Comments
- The operation is not defined for the time 0T
- Overflow may occur
- The operation is not defined if the decimal has a fractional part
Since a C/AL TIME variable can be thought of (is internally stored as) as an integer containing 1 plus the # of milliseconds from midnight, and adding an integer to a time gives a new time integer milliseconds later, you can achieve your result as follows:Thank you fb, it worked fine, even with fraction!!
Arhontis
https://forum.mibuso.com/search