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.weekmonthstartdate ====== <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"."weekmonthstartdate" IS {create function weekmonthstartdate /* Application Maintained Function / Procedure - DO NOT EDIT*/ (in perd integer,in worm char(1)) returns date begin declare rv date; declare w integer; declare y integer; set y=truncnum(perd,-2); set w=perd-y; set y=y/100; if worm = 'W' then return weekenddate(y,w)-6 end if; set rv=dateadd(Month,(select monthoneoffset from params),ymd(y,w,1)); return(rv) end } </code> database/procedures/pears_weekmonthstartdate.txt Last modified: 2026/08/07 19:24by 127.0.0.1