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)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top