Hi, I need some help ... (Visual Basic 2008 Express)
I have the next line of code :
- Form2.Label54.Text = DateTimePicker1.Value
when I change the date on DateTimePiker control label54 display date an hour.
I change the format of DateTimePiker to short or custom but i get the same thing.
I need to display only the date selected.
Thanks.
Form2.Label54.Text = DateTimePicker1.Text Would result in Saturday, March 1, 2008 on my form but if your looking to get rid of the weekday then;
Another option is
Form2.Label54.Text = DateTimePicker1.Value.Date Would result in 3/1/2008
Otherwise you could build the string
strDate = DateTimePicker1.Value.Month
strDate = strDate & "-" & DateTimePicker1.Value.Day
strDate = strDate & "-" & DateTimePicker1.Value.Year
Form2.Label54.Text = strDate Would result in 3-1-2008