>Hi. I am doing a payroll report. I was told to include the monthly pay period that includes the 12th of the month. We have a 14 day pay cycle.
>
>Q: how can I extract pay periods that just include the 12th? Note that I have a start date and end date for each period (as well as a check date) on each record.
>
>Thanks, Randy
This is not anything like an elegant solution, but I think it will work
FUNCTION has12th
LPARAMETERS StartDate,EndDate
LOCAL llReturn
llReturn = .F.
FOR I = 0 to (EndDate - StartDate)
IF DAY(StartDate + i) = 12
llReturn = .T.
ENDIF
ENDFOR
RETURN llReturn