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> COMMENT TO PRESERVE FORMAT ON PROCEDURE "pears"."GetShiftLength" IS {create function 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/procedures/pears_getshiftlength.txt Last modified: 2026/08/07 19:24by 127.0.0.1