Dim d As Date
Date.IsLeapYear(Year(d))
Dim madate As String madate = TextBox1.Text If Not IsDate(madate) Then MsgBox "donnée invalide !": Exit Sub If IsDate("29/02/" & Year(madate)) Then MsgBox "oui" Else MsgBox "non" End If
Private Sub TxtDateMailEnvoye_AfterUpdate() Dim IsBissextile As Boolean 'Les conditions pour avoir une année bisextile sont les suivantes: ' - année divisible par 4 : année bisextile ' - exception : année divisible par 100 : année non bisextile ' - exception de l'exception : année divisible par 400 : année bisextile If Year(maDate) Mod 4 0 And (Year(maDate) Mod 100 <> 0 Or Year(maDate) Mod 400 0) Then IsBisextile = True Else IsBisextile = False
Dim d As Date d.IsLeapYear(d.Year)
Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre questionDim d As Date Date.IsLeapYear(Year(d))
Dim madate As Date madate = "01/01/2016" If IsDate("29/02/" & Year(madate)) Then MsgBox "oui" Else MsgBox "non" End If
Dim d As Date
Date.IsLeapYear(Year(d))
Dim madate As Date madate = "01/01/2016" If IsDate("29/02/" & Year(madate)) Then MsgBox "oui" Else MsgBox "non" End If
madate as date"
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim d As Date = "01/01/2008 Label1.Text = Date.IsLeapYear(Year(d)) End Sub
Dim d As Date "01/01/2008"par
Dim d As Date Today 'Date du jour, il indiquera False.