Total Hours Calculation
Application Type
Service Studio Version
11.54.25 (Build 62773)

Hello Outsystems Community, I want to get total hours of Working hours by using this code:
NewTime(    (OverAllComputationWorkHoursFilteredbyDate.List.Current.WorkTimeComputationSum/3600),    Mod(OverAllComputationWorkHoursFilteredbyDate.List.Current.WorkTimeComputationSum/60,60),    Mod(OverAllComputationWorkHoursFilteredbyDate.List.Current.WorkTimeComputationSum,60))
I first converted the time in seconds using diff seconds in the Data base and it works well. However when it only holds 24hrs and now when it exceeds to that it returns 00:00:00 value is there any way to fix this? Thank you 

Screenshot 2023-09-21 212856.png
Screenshot 2023-09-21 213034.png

Hey Josiah,

If the data type is "Time" then it has some upper bound and lower bound.

If you want to hours that exceeds 23:59:59 then you should use "Text" data type. Use the below

code :

(OverAllComputationWorkHoursFilteredbyDate.List.Current.WorkTimeComputationSum /3600)+":"+

Mod(OverAllComputationWorkHoursFilteredbyDate.List.Current.WorkTimeComputationSum /60,60)+":"+

Mod(OverAllComputationWorkHoursFilteredbyDate.List.Current.WorkTimeComputationSum ,60)

Make sure to use data type as text.

Thanks & Regards,

Sudip Pal

Just did some few adjustments and it worked out well, Thank you very much

I am happy to help you. Have a great day!

Thanks & Regards,

Sudip Pal

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.