I have written XML file having a Date <Date>10/11/2011</Date>
tag in it as above and trying t开发者_如何转开发o read it from VB.NET:
If TypeOf item Is DateTime Then
nextItem = DirectCast(item, DateTime).ToString("MMM-d-yyyy hh:mm:ss.fff", ci)
End If
How to get the date tag in XML in datetime format in the application? (As I am getting the date value as string in the application)
Maybe XmlConvert.ToDateTime()
will do the trick...
(See MSDN Documentation)
精彩评论