Convert real number to time string
While I was developing a report for payroll module, We had done some customization for storing employee's total working hours in a separate table and I had to develop a report for employee's time sheet to show his/her time in and time out. As I was getting total time in hour [Real number] so I had to change real hour to time and then calculate employee's time in and time out for each day of the month. Here is the code to convert real hour to time. static void realHour2Time(Args _args) { int hours, minutes; real fractionalPart, hourInReal = 7.3555; str minStr, timeStr; if (hourInReal != 0) { hours = trunc(hourInReal ); fractionalPart = hourInReal - hours; minutes = fractionalPart*60; if (strLen(strFmt("%1", minutes)) == 1) ...