datefldtocheck := @Date(dateadded); datediff:= datefldtocheck - @Date(@Year(datefldtocheck) ; 1 ; 1 ); weeknumber := @Integer(datediff/604800); weeknumber