Month calendar, convert a day value to string

Tech1

Member
Joined
Apr 2, 2009
Messages
5
Programming Experience
1-3
:confused:Does any one knows how to convert the Month calendar day value from a Integer to a string.
 
You mean the Date day value, MonthCalendar is just a control for working with Date values. Use the ToString method for the Date value specifying the custom display format:
VB.NET:
Dim d As Date = Me.MonthCalendar1.SelectionStart
Dim day As String = d.ToString("dddd")
Look up DateTime.ToString(String) method in help and follow the link for the "Custom Date and Time Format Strings" topic to learn more about this.
 
Back
Top