week of month

Do navision have a fuction that can find a week of month?

Try using This EVALUATE(startmth[1],FORMAT(WORKDATE,0,’’)); EVALUATE(startmth[2],FORMAT(CALCDATE(‘CM-1M’,WORKDATE),0,’’)); MESSAGE(’%1’,startmth[1] - startmth[2] + 1); Think this is what you are looking for

Funny Request If the month started on Sunday 1st would Monday 2nd be in week 2 ? Or would the required week start on the 1st day? Which week of the Month with the 1st as a base date So Today 19th May would be in the third Week although it is the 4th part week in May. WORKDATE := 19052003D; MESSAGE(’%1’,(WORKDATE - CALCDATE(’-CM’,WORKDATE) + 1) DIV 7 + 1); Now For the Part week the 5th is a Monday so this would fall in week 2 WORKDATE := 05052003D; MESSAGE(’%1’,(7 - DATE2DWY(CALCDATE(’-CM’,WORKDATE), 1) + (WORKDATE - CALCDATE(’-CM’,WORKDATE) + 1)) DIV 7 + 1); Have fun! [:D]