what method to use to add 1 day to a date (hotel reservation for one night by clicking on calender)

A

Amanda

here is my code; see ????


Private Sub dtmMonthCalendar1_MouseLeave(ByVal sender As Object, _
ByVal e As System.EventArgs) Handles dtmMonthCalendar1.MouseLeave

mdatArrivalDate = dtmMonthCalendar1.SelectionStart
txtArrivalDate.Text = mdatArrivalDate

If dtmMonthCalendar1.CanSelect Then
txtDepartureDate.Text = dtmMonthCalendar1.SelectionEnd
txtNightStayed.Text = (dtmMonthCalendar1.SelectionEnd _
- dtmMonthCalendar1.SelectionStart).TotalDays
Else
txtDepartureDate.Text = ????
txtNightStayed.Text = "1"
End If '

mshrNightStayed = Val(txtNightStayed.Text)
dtmMonthCalendar1.Hide()

End Sub
 
A

Amanda

Cor said:
Amanda,

By instance
mdatArrivalDate = mdatArrivalDate.AddDays(1)

Yeah, I needed to assign to a date variable and then call AddDays. I
was hoping that I could just do it diretcly to calender.SelectionEnd.

Thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top