Insert Date only into an array

  • Thread starter Thread starter zoneal
  • Start date Start date
Z

zoneal

Hi,

I am quite new in VB.NET and I was wondering if someone could help me
with this problem:

I declared the following array: dim ArrayList() as date

Problem is, whenever I add a date to the array, it is displayed as the
date with time (e.g. 5/9/2005 12:00:00 AM). I don't want the time
function to be part of the item to be added in the array. I have tried
various formatting methods but to no avail. I would be very grateful to
receive assistance of any kind especially code samples.

Thanks
 
The Date object, as you have found out, by default returns or stores a date
and time. I guess a couple of simple possibilities are to use a string array
instead of a date array and manipulate (format) your date prior to adding to
the array. Or alternatively you retrieve the elements and format them prior
to use.

Regards,

Phil
 

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