R
Rans-Yaw
Guest
Am having some difficulties with converting listbox dates (having the format dd-MM-yyyy) to datetime which i want to compare with monthcalendar date and instruct vb to bolden those dates on the calendar. Below is the novice quote i was trying to use to solve this. I get the following error when i tried running the code "Unable to cast object of type 'ObjectCollection' to type 'System.IConvertible'". I hope professionals on this platform will help me solve this. Thanks.
For Each item In ListBoxDates.Items
Dim listdate As DateTime = Convert.ToDateTime(ListBoxDates.Items)
Dim eventdates() As Date = New Date() {convertdate}
MonthCalendarEvents.BoldedDates = eventdates
Next
Continue reading...
For Each item In ListBoxDates.Items
Dim listdate As DateTime = Convert.ToDateTime(ListBoxDates.Items)
Dim eventdates() As Date = New Date() {convertdate}
MonthCalendarEvents.BoldedDates = eventdates
Next
Continue reading...