VB Date

Fermé
jijudu Messages postés 211 Date d'inscription jeudi 15 mai 2008 Statut Membre Dernière intervention 3 septembre 2009 - 10 juin 2008 à 16:21
yg_be Messages postés 22707 Date d'inscription lundi 9 juin 2008 Statut Contributeur Dernière intervention 19 avril 2024 - 10 juin 2008 à 21:22
Salut Forum,


Voila j'ai une date qui correspond à la date du systéme:

Dim MaDate as string
MaDate = Format(Date, "yyyy-mm-dd")

ET j'aimerai retrancher 1 jour via NewDate

par exemple si MaDate = 2008-06-10
NewDate=2008-06-09



Merci !!
+++
A voir également:

1 réponse

yg_be Messages postés 22707 Date d'inscription lundi 9 juin 2008 Statut Contributeur Dernière intervention 19 avril 2024 1 471
10 juin 2008 à 21:22
Sub testdate()
Dim MaDate As Date
Dim newdate As Date
MaDate = Date
newdate = MaDate - 1

Debug.Print MaDate, newdate
End Sub
0