4 messages in org.openoffice.fr.progRE: [prog] calcul sur les dates
FromSent OnAttachments
GeGeJun 21, 2005 6:16 am 
Jean...@i-carre.netJun 21, 2005 6:22 am 
Jean...@i-carre.netJun 21, 2005 6:33 am 
GeGeJun 21, 2005 10:17 am 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:RE: [prog] calcul sur les datesActions...
From:Jean...@i-carre.net (Jean@i-carre.net)
Date:Jun 21, 2005 6:33:41 am
List:org.openoffice.fr.prog

Rebonjour,

[...] Pourquoi suis-je obligé d'enlever 2 jours pour avoir la date correcte à "+ 1

an"? Sans correction, j'obtiens systématiquement comme date à 1 an, la date de début + 1 an et 2 jours (20/06/2005 -> 22/06/2006). [...]

Cela provient du type de données utilisé, utiliser un type "Date" prévu à cet effet

Jean-Claude

Sub Main dim vDate as date dim vDateFin as date

vDate = cdatefromiso("2005-06-20") Print vdate

vdatefin = dateserial (year (vdate) + 1, month (vdate), day (vdate)) Print vdatefin '20/06/2006 End Sub