I wrote a script for this based on how my previous company defined work weeks. You can modify it to however you define work weeks where you are.
//Arguments:
//_ww_ = Work week, 1 to 53
//_year_ = Four digit year, e.g. 2004
//_dayofweek_ = 1-7 (1 = Sunday...)
::iwwtodate = Function(
//Function Arguments
{_ww_, _year_,_dayofweek_,
//Local Variables
_ww01thisyear_ = 0,
_sundayww01_ = 0
},
_ww01thisyear_ = Informat("01Jan" || Char(_year_));
_sundayww01_ =_ww01thisyear_ - (Day Of Week (_ww01thisyear_)- 1) * 24 * 3600;
(_ww_ - 1) * 7 * 24 * 3600 +_sundayww01_ + (_dayofweek_ -1) * 24 * 3600
);
Message was edited by: Chadd McNicholas