>vfp 3.0
>
>Hello All,
>
>I am trying to do a batch print for example
>
>on the 15th of the month, I would like to print all
>records entered for the previous month.
>
>Have been trying to use month() function with no luck.
>
>Any thoughts? Thanks and have a good day.
>
Becky,
I'm not exactly certain what the problem is because you don't specify how you're using MONTH(). However, I'll take a shot at it based on your trying to determine the first and last days of the previous month.
ldstart = GOMONTH(lddate, -1)
ldstart = DATE(YEAR(ldstart), MONTH(ldstart), 1)
ldstop = GOMONTH(ldstart, 1) - 1
That do?
George
Ubi caritas et amor, deus ibi est