Saving Times in .Net

  • Thread starter Thread starter Chris Huddle
  • Start date Start date
C

Chris Huddle

I'm trying to save a time (08:01 for example) to a Data/Time field
(formatted Short Time) in an Access table using VB.NET. The problem is
that even when I write this time to a dataset, it winds up saving as
#08/28/2003 08:01 AM# in the database, where the date is today's date. In
plain ol' VB6, I am able to write 08:01 to the database with no date. Is
there any way to write the time only in VB.NET?
 
In
plain ol' VB6, I am able to write 08:01 to the database with no date. Is
there any way to write the time only in VB.NET?

I don't believe so, but you can use a string field instead of date time to
store plain times.
 
Back
Top