DateTime Conversion

E

evint

Folks,
I have created a DataTable containing a column, FilterOn, using the
DateTime type:
col = tbl.Columns.Add("FilterOn", GetType(DateTime))

While attempting to store a value of #12:00:00 AM# I observed that
what actually gets stored is the "Default Date" of 1/1/0001, without
the time. Apparently this happens because the .NET Framework and COM
assume a default date when only a time is specified.

There are frequent occasions when I only want to store 12:00:00 AM
in the field, without any date. Is there a propery or method, etc that
I can use to make this happen? This table is being used to insert
records into an Access database. The Access database has gobs of these
type dates.

Thanks,
Vint
 

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

Top