lctime = TTOC(DATETIME(2002, 1, 24) + lnseconds, 2)Does it matter what parameters datetime() takes? I don't think it does (as long as its a valid date). I could just put in the year, month, and date the employee punched out at. The only problem with that is the nightshift. They'll punch in at something like Jan 24, 2002 at 2:30 PM and punch out on Jan 25, 2002 at 12:30 AM. However, I don't think it matters what datetime(lnyear, lnMonth, lnDay) is - because we are just looking for the hours worked.
lnhours = SET("HOURS") >SET HOURS TO 24 >* lnseconds is the difference returned by the subtraction >* of one date/time from another >* the date value shown below is of no consequence >* and can be any date. >lctime = TTOC(DATETIME(2002, 1, 24) + lnseconds, 2) >* Restore the orginal setting of hours >SET HOURS TO lnhoursIn this example, this will return "10:35:00". If the seconds aren't needed simply take the first five character using the LEFT() function.