Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Month() needs help
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00405422
Message ID:
00405433
Views:
15
>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.
* lddate is the 15th day of the current month
ldstart = GOMONTH(lddate, -1)
* Get the first day of the start month
ldstart = DATE(YEAR(ldstart), MONTH(ldstart), 1)
* Get the last day of the month
ldstop = GOMONTH(ldstart, 1) - 1
That do?
George

Ubi caritas et amor, deus ibi est
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform