Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Get begin and end dates of a quarter
Message
 
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9 SP1
Miscellaneous
Thread ID:
01478625
Message ID:
01478626
Views:
94
This message has been marked as the solution to the initial question of the thread.
>The QUARTER() function returns the quarter. Is there a way to calculate the first and the last date of a calendar quarter? I suppose I can "build" such a function but I was wondering if there is already a "built-in" function for that?
>

No there isn't built-in function but it's easy to create an UDF
lnQuaterStart = DATE(lnYear, (lnQuarter -1) * 3 + 1, 01)
lnQuorterEnd = GOMONTH(lnQuaterStart,3) - 1
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform