Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
The beginning of a quarter
Message
De
14/01/2009 08:06:30
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Vista
Divers
Thread ID:
01373480
Message ID:
01373497
Vues:
24
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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform