Kbase P17084: 4GL. How to calculate a date range knowing the week number?
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  20/06/2005 |
|
Status: Unverified
GOAL:
4GL. How to calculate a date range knowing the week number?
FACT(s) (Environment):
Progress 9.x
FIX:
DEF VAR wweek AS INT LABEL "Enter the week".
DEF VAR january AS DATE INIT 01/01/2004.
REPEAT:
DO:
UPDATE wweek WITH FRAME a.
IF wweek > 52 OR wweek = 0 THEN DO:
MESSAGE "incorrect week range" VIEW-AS ALERT-BOX.
UNDO, RETRY.
END.
END.
DISPLAY "from : " january + wweek * 7 - 7 "To : " january + wweek * 7
WITH FRAME a.
END.
In OpenEdge 10 look for the Interval Function:
Returns the time interval between two DATE, DATETIME, or DATETIME-TZ values.