Interested in creating and selling training? You pick the price, 50/50 revenue share, and you own the content. Find out more at
I'm working with Nav 5 and need to sum Time + Time, but and error is displayed (can't sum Time + Time)...
How can I do it?, it's just 5:00 + 3:00 = 8:00, I can't believe it doesn't work !!
In Navision you can subtract datetype time but you can’t sum time datetype. You can only sum an integer to time. Integer it’s the number of milliseconds to increase. You could second time to an integer.
ok, but how do I convert the secondt time to integer?
galletin said:ok, but how do I convert the secondt time to integer?
A small piece of code that takes the actual time, calculates the milliseconds and adds an hours and outputs the result:
v_time := TIME;EVALUATE(v_int, FORMAT(v_time,0,'<Hours24>'));EVALUATE(v_int, FORMAT(v_time,0,'<Minutes,2>'));EVALUATE(v_int, FORMAT(v_time,0,'<Seconds,2>'));v_int := (v_int * 60 * 60 * 1000) + (v_int * 60 * 1000) + (v_int * 1000);EVALUATE(v_time, '01:00');v_time += v_int;MESSAGE('%1 %2 %3', v_time, v_int, v_time);
Wow thank you so much, I'll check right now !!!