I am working on a program where I have two datetimepickers and need the difference in days between the two dates. I have the format property for both set to short. When I add the datetimepicker to a label it prints as 12:00:00AM instead of as a date.. How do I format this to return tghe day of the month selected in the picker?
Dim d1 As Date = DateTimePicker1 .Value
Dim d2 As Date = DateTimePicker2 .Value
totdays = DateDiff(DateIn terval.Day, d2, d1)
Thanks for any guidance.
Dim d1 As Date = DateTimePicker1 .Value
Dim d2 As Date = DateTimePicker2 .Value
totdays = DateDiff(DateIn terval.Day, d2, d1)
Thanks for any guidance.
Comment