timestamp problem

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.
 
R

Rick B

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.
 
C

Carlor

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.
 

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