none
Vb.Net 2008 - AddDays function RRS feed

  • Question

  • I am using VS2008 and have a problem with addDays function by using vb.net.

    In "Regional and  language options" (Control Panel),

    - if short date is as follow: 10/05/2013, the code below works properly

    - if short date is like this: 2013-05-10, it does not work fine. I mean days are not bolded

    Private Sub AcceptedRangeDate(ByVal NumberOfDays As Integer)
            Dim x As Integer
            Dim blDate As Date
            blDate = CDate(rtDate)
            For x = 0 To NumberOfDays - 1
                MonthCalendarDate.AddBoldedDate(blDate.AddDays(x))
            Next
            MonthCalendarDate.UpdateBoldedDates()
      End Sub

    Is there a problem with my code? Is it a bug? Is there any solution?

    Friday, May 10, 2013 3:20 PM