VB.NET: Extract day, month or year from the Listbox..[Unresolved]
Say I have these dates in the listbox...
First Date: 10/2/2004
Second Date: 12/4/2004
but how to extract the "2" from the first date into the textbox..
Since i need to display all the dates and from there the user will choose from any of the dates..
lastly, the choosen day, month and year will be separately display into 3 textboxes...
Is there any way to solve it or i should not use the listbox to do it...
any suggestion..
Thanks
Re: VB.NET: Extract day, month or year from the Listbox
Say i have these dates:
12-2-05......can
12-12-05....can
12-13-05....cannot
12-22-05....cannot
Refer to the above dates, why the below XML tag could not work well with days above "12"... when i send to server..
I could only send 1,2,3,4,5,....up to 12 only.
Code:
"<" & "Date" & " " & "day=" & """" & Convert.ToDateTime(lst.SelectedItem.ToString).Date.Day & """" & " "
& "month=" & """" & Convert.ToDateTime(lst.SelectedItem.ToString).Date.Month & """" & " " & "year=" & """"
& Convert.ToDateTime(lst.SelectedItem.ToString).Date.Year & """" & " >" & _
</" & "Date" & ">" & _
The error message is:
Code:
Additional information: String was not recognized as a valid DateTime.
Does anyone have better solution to solve it....
Thanks
Re: VB.NET: Extract day, month or year from the Listbox..[Unresolved]
For the above problem....
I am not sure why if i use other set of computers with the same Visual Studio 2003, it works...
how to update all the classes so that my computer could also be use..
Re: VB.NET: Extract day, month or year from the Listbox..[Unresolved]
I find the problem is on the Format of the D/MM/YYYY...
After i change the date format, it could work...
Is there any way to format the date so that the program could works well in all computers without having to worry about whether the computer have set to the required date format.....
Thanks