Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Handling Dates Beginning of Month and End of Month
Message
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9 SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01512731
Message ID:
01512826
Views:
53
>Why not use a -1 from the 1st of the month? DATE(2011,3,1) - 1 returns 2/28/11
>
>
>>>We know that February's numbers of days varies from 28 to 29 depending on if the year is a leap year.If you want to get the ending date of a month and don't want to deal with determining the leap year, how would you do this?
>>>
>>>Cecil
>>
>>Also if you test these, 2011 will give you an empty date, but 2012 will not
>>
? date(2011,2,29)
>>? date(2012,2,29)
Because if you are in a loop for a payroll function and your pay period is in february you would not use the march argument.
Previous
Reply
Map
View

Click here to load this message in the networking platform