how to count time work ax 2009

i want to calculate how long employyes work in hour and minute.

example:

timeofday employeeIn, employeeOut, employeeWork;

employeeIn = 23:00:00

employeeOut = 07:00:00

employeeWork = count time employeeIn and employeeout.

how to apply that.please help.

Did you take a look at table SysUserLog?

SysUserLog table dataype DateTime and extended datatype TransDateTime then use methode onlineTime = DateTimeUtil::getDifference(logoutDateTime, loginDateTime);

i am using datatype time and extended datatype timeOfDay.

how to implement it.

If you don’t have date, how do you know to which day the time belongs? Do you assume that the period never exceeds 24 hours?

In that case, it’s pretty easy math. For example:

#TimeConstants
int employeeWork = employeeOut - employeeIn;
if (employeeWork < 0)
{
    employeeWork += #secondsPerDay;
}

i have row date to store day and time to store time with format 24 hour.

and i want to know how long employee work by employee in and out.

thanks martin.

Then just create utcDateTime values from dates and times and subtract them. Trivial.