Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Calculation between 2 dates
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
Divers
Thread ID:
01526250
Message ID:
01526276
Vues:
73
This message has been marked as a message which has helped to the initial question of the thread.
>Hi all,
>
>i have calculation on 2 europeans dates.
>
>i have {^2010-07-31} and i want {^2010-07-01}
>i have {^2010-08-31} and i want {^2010-08-01}
>i have {^2010-09-30} and i want {^2010-09-01}
>
>
>This result is bad
>
> m.oObjet.d_debut = GOMONTH(  m.datefin , -1 ) + 1
>
>
>somebody knows ?
>
>Thank in advance for help
>
>
>bernhart
* 1. Begin of Month

ldDate =  DATE(2010,07,31) 
? BoM(ldDate)

FUNCTION BoM(tdFecha)
  RETURN DATE(YEAR(tdFecha),MONTH(tdFecha),1)
ENDFUNC 

* 2. End Of Month

ldDate =  DATE(2010,07,1) 
? EoM(DATE())

FUNCTION EoM(tdFecha)
  LOCAL ld 
  ld = GOMONTH(tdFecha,1)
  RETURN ld - DAY(ld)
ENDFUNC 
Luis María Guayán
Tucumán, Argentina
________________________________
SysOp de www.PortalFox.com
Nada corre como un zorro
________________________________
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform