FUNCTION Week *: Description: Returns the week number of dDate *: Assumes Sunday is First Day of the week *: *: Parameters: dDate - A valid FoxPro date. *:********************************************** PARAMETER dDate PRIVATE dJan1, nOffset, nRetVal dJan1 = CTOD("01/01/"+ALLTRIM(STR(YEAR(dDate)))) nOffset = DOW(dJan1) nRetVal = CEILING((nOffSet + (dDate - dJan1))/7) Return nRetVal