Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Month() needs help
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00405422
Message ID:
00405433
Vues:
16
>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform