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.DateAndTimeOverLap ====== <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"."DateAndTimeOverLap"( /* Application Maintained Function / Procedure - DO NOT EDIT*/ in "s1d" date,in "s1t1" time,in "s1t2" time,in "s2d" date,in "s2t1" time,in "s2t2" time ) returns tinyint begin declare "rv" tinyint; declare "s1f" timestamp; declare "s1t" timestamp; declare "s2f" timestamp; declare "s2t" timestamp; set "rv" = 0; if "s1t1" is null then set "s1t1" = '00:00:00' end if; if "s2t1" is null then set "s2t1" = '00:00:00' end if; if "s1t2" is null then set "s1t2" = '23:59:59' end if; if "s2t2" is null then set "s2t2" = '23:59:59' end if; set "s1f" = "s1d"+"s1t1"; set "s1t" = "s1d"+"s1t2"; set "s2f" = "s2d"+"s2t1"; set "s2t" = "s2d"+"s2t2"; if "s1t" <= "s1f" then set "s1t" = "dateadd"("day",1,"s1t") end if; if "s2t" <= "s2f" then set "s2t" = "dateadd"("day",1,"s2t") end if; if "s1f" < "s2t" and "s1t" > "s2f" then set "rv" = 1 end if; return "rv" end </code> database/functions/pears_dateandtimeoverlap.txt Last modified: 2026/08/07 19:24by 127.0.0.1