Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Days in a month
Message
 
À
29/05/2001 11:52:45
Information générale
Forum:
Visual Basic
Catégorie:
Autre
Titre:
Divers
Thread ID:
00512259
Message ID:
00512299
Vues:
11
>Hello Guys
>
>I need to know the number of days in a month, how would I go about doing this?

You can use this:
Private Sub Form_Load()
Dim dtmDate As Date
    dtmDate = CDate("2001/02/03")
    dtmDate = DateAdd("d", -1, DateSerial(Year(dtmDate), Month(dtmDate) + 1, 1))
    
    MsgBox Day(dtmDate)
End Sub
Éric Moreau, MCPD, Visual Developer - Visual Basic MVP
Conseiller Principal / Senior Consultant
Moer inc.
http://www.emoreau.com
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform