Show pageOld revisionsBacklinksExport to PDFFold/unfold allBack to top This page is read only. You can view the source, but not change it. Ask your administrator if you think this is wrong. ====== pears.AddRecoveryHours ====== <WRAP center round info> Generated schema reference. Regenerate this page from the SQL unload; keep hand-maintained business notes in the narrative namespace. </WRAP> ===== Original SQL ===== <code sql> create function "pears"."AddRecoveryHours"( /* Application Maintained Function / Procedure - DO NOT EDIT*/ in "tfrom" time,in "tto" time,in "hrs" smallint ) returns time begin declare "rv" time; if "isnull"("hrs",0) <= 0 or "tfrom" is null or "tto" is null then return "tto" end if; if "hrs" > 23 then set "hrs" = 23 end if; set "rv" = "dateadd"("hour","hrs","tto"); if "rv" < "tto" and "rv" >= "tfrom" then set "rv" = "dateadd"("minute",-1,"tfrom") end if; return "rv" end </code> database/functions/pears_addrecoveryhours.txt Last modified: 2026/08/07 19:24by 127.0.0.1