timestamp problem

  • Thread starter Thread starter carlor
  • Start date Start date
C

carlor

Hi there,

I'm having trouble with dates/times in my table. I have a
vb.net Date that I'm trying to add to the table. The Date
contains the date and time (timestamp) but when it gets
entered via my windows form, only the date shows up and
the time is set to 12:00. Does anyone know how to fix
this problem?

Thanks,

Carlo.
 
It sounds to me like you are passing a date only to a date/time field. if
you only enter the date, I believe the time will default to 12:00.

Rick B

Hi there,

I'm having trouble with dates/times in my table. I have a
vb.net Date that I'm trying to add to the table. The Date
contains the date and time (timestamp) but when it gets
entered via my windows form, only the date shows up and
the time is set to 12:00. Does anyone know how to fix
this problem?

Thanks,

Carlo.
 
Hi Rick,

In my table, the timestamp field is a Date/Time datatype.

In my windows form code I basically have:

dim timestamp as Date
timestamp = Now
Dim dr As DataRow = Ds1.TransHistory.NewRow
dr.item("hist_timestamp") = timestamp
Ds1.TransHistory.Rows.Add(dr)
daTransHistory.Update(Ds1)

So, as far as I can tell, I'm passing in the full
date/time object but it's not being stored accordingly.

I hope this helps explain what I'm doing.

Thanks,

Carlo.
 
Back
Top