Simple DateTimePicker question

  • Thread starter Thread starter Brett Baisley
  • Start date Start date
B

Brett Baisley

Hello

I am using two datetimepicker controls to allow the user to select two
dates. I've called them dateIn and dateOut. After they pick the dateIn, I
want to set its Leave method to automatically set the date of dateOut to
whatever was selected in dateIn + 2 days (as this will be the most common
selection for the second date).

I tried this:
dateOut.value = dateIn.value + 2

But I get an error saying I can't add date's and doubles.

Is there a way to increment the date by 2?
 
* "Brett Baisley said:
I am using two datetimepicker controls to allow the user to select two
dates. I've called them dateIn and dateOut. After they pick the dateIn, I
want to set its Leave method to automatically set the date of dateOut to
whatever was selected in dateIn + 2 days (as this will be the most common
selection for the second date).

I tried this:
dateOut.value = dateIn.value + 2

\\\
DateOut.Value = DateIn.Value.AddDays(2)
///

--
Herfried K. Wagner
MVP · VB Classic, VB.NET
<http://www.mvps.org/dotnet>

<http://www.plig.net/nnq/nquote.html>
 
Back
Top