Reading Date

waraq

Member
Joined
Dec 18, 2006
Messages
23
Location
Harrison, TN
Programming Experience
Beginner
Hi! I'm trying to read the month from a DateTimePicker1 and then compare it to Dim Meses AsString = Now.ToString("MMMM"). I just need the month from the DataTimePicker. The DataTimePicker is the date that the user select.

I would like to know the best solution to this problem, or if there is any written explanation of how to do this.

Thanks in advance for your help.

Waraq
A4:12
S86:12-13
 
DateTimePicker1.Value.Month

It return month on selected date in integer. If you want to return it with it's name, try this

dim messes as string
messes = Format(DateTimePicker1.Value.Month,"MMMM")
 
Back
Top