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.GetShiftLength ====== <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"."GetShiftLength"( /* Application Maintained Function / Procedure - DO NOT EDIT*/ in @TimeFrom time,in @TimeTo time, in @BreakMinutes smallint default 0 ) returns double begin declare "ShiftLength" double; if @TimeTo > @TimeFrom then set "ShiftLength" = (cast("datediff"("minute",@TimeFrom,@TimeTo) as double)-"isnull"(@BreakMinutes,0))/60.0 else set "ShiftLength" = (cast("datediff"("minute",@TimeFrom,'00:00:00') as double)+1440.0+cast("datediff"("minute",'00:00:00',@TimeTo) as double)-"isnull"(@BreakMinutes,0))/60.0 end if; return "ShiftLength" end </code> database/functions/pears_getshiftlength.txt Last modified: 2026/08/07 19:24by 127.0.0.1