4
Contributors
3
Replies
4
Views
5 Years
Discussion Span
Last Post by abbyjo
0

Simply drag two dateTimePickers onto your form, one for the from date and the other for the to date. You can then access the DataTimePicker.Text method to retrieve the value of either one. E.g. some simple code to get the days between two dates

Dim date1 As New Date
Dim date2 As New Date
date1 = DateTimePicker1.Text
date2 = DateTimePicker2.Text
Label1.Text = (date2 - date1).ToString
0

ASP.NET does not have a datetimepicker control as in VB.NET. the closest to serve this perpose is the Calendar or CalendarExtender which is in the AjaxControlsToolkit. This will give you only the date and not attach the time to it.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.