Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Days in a month
Message
 
To
29/05/2001 11:52:45
General information
Forum:
Visual Basic
Category:
Other
Title:
Miscellaneous
Thread ID:
00512259
Message ID:
00512299
Views:
10
>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
Previous
Reply
Map
View

Click here to load this message in the networking platform