VishalMistry
3rd December 2015, 13:00
Hello,

In Baan IV, i have a session where i want to display a session start time and session completion time.

For this i have taken two variables start.time and end.time of domain tctime.

and display format on form is 99:99. but when I run the session and store the value of time.num in these two variables, it is displayed on form as #####.

I don't know the reason why it is happening. Can anybody guide me in this regard ?

Vishal

zardoz
3rd December 2015, 14:12
In baan IV time is calculated in second from midnight, so you have to decodify the given number (by ex: 3600 means 06:00 AM) to obtain the form HH:MM . by example:

function string decode.time(domain tctime i.time)
{
string x(5) fixed

x(3) = ":"
x(1;2) = edit$(i.time / 3600, "99")
x(4;2) = edit$(i.time \ 3600, "99")
return(x)
}