How do you calculate Week Ending in Progress Version 10.1B

Posted by bcbennett on 19-Apr-2011 10:04

I need to calculate a week ending being Saturday.  I computed the week ending day with this formula -

DATE(String(Year(SOARDUEDATE), "9999") + "/" + String(Month(SOARDUEDATE), "99") + '/' +

String(Day(SOARDUEDATE + (7 - Weekday(SOARDUEDATE))), '99'))

However, it is having problems with dates such as 6/1 - which has a week ending date of 6/4 - my formula does not change the month - and a date of 6/1 has a week ending of 5/1.

All Replies

Posted by Admin on 19-Apr-2011 10:20

Let Progress do the month (and year) overflow stuff:

MESSAGE SOARDUEDATE + (7 - WEEKDAY (SOARDUEDATE))

VIEW-AS ALERT-BOX INFO BUTTONS OK.

Posted by bcbennett on 19-Apr-2011 15:52

Thank you!!! Worked great.

This thread is closed