DateTime Conversion

  • Thread starter Thread starter evint
  • Start date Start date
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
 
Back
Top