Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
The beginning of a quarter
Message
From
14/01/2009 08:06:30
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Vista
Miscellaneous
Thread ID:
01373480
Message ID:
01373497
Views:
17
This message has been marked as a message which has helped to the initial question of the thread.
>Hi all,
>
>
>I have a date and i want the beginning of a quarter.
>
>eg1 = 01/01/2009
>eg2 = 23/02/2009
>eg3 = 15/04/2009
>
> beginning of a quarter( eg1 )
> beginning of a quarter( eg2 )
> beginning of a quarter( eg3 )
>
>
>01/01/2009 Give 01/01/2009
>23/02/2009 Give 01/01/2009
>15/04/2009 Give 01/04/2009
>
>
>
>thank in advance
>
>bernhart


Year : same
Day : 01
Month:

Q = ceiling(month(m.d)/3)
QuarterStart = date(year(m.d), m.Q*3-2, 1)
QuarterEnd = eomonth(date(year(m.d), m.Q*3, 1))
Gregory
Previous
Reply
Map
View

Click here to load this message in the networking platform