Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

datetimepicker - calculate difference between 2 dates

Status
Not open for further replies.

honeypot

Technical User
Mar 6, 2001
147
GB
hi all :)
i have 2 datetimepicker controls on my form. in the 1st one, it shd automatically display the current date anyway but i need to use the 2nd datetimepicker to automatically display 14 days ahead of the 1st one. Perhaps i shdn't b using dtp, though the user shd be able to amend the date if they so wish. Any help greatly appreciated. Thanx.
 
Code:
Dim d As DateTime = DateTime.Now

DateTimePicker1.Value = d

DateTimePicker2.Value = d.AddDays(14)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top