Array Of Objects

  • Thread starter Thread starter elziko
  • Start date Start date
E

elziko

If I have an array of objects (each of which is a string) how would I coerce
one item in that array into a DateTime

TheArray(i) = CType(TheArray(i),DateTime) doesn't seem to work (after this
the item still remains a String type). I can create a new array and copy
each value over coercing when necessary but I'd rather not create a new
array of possible.
 
Thats because you are trying to cast it to a date. You need to do this or
something like it

TheArray(i) = New DateTime(StringVariable)
 
Back
Top