Re: timestamp problem

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: Carlor (anonymous_at_discussions.microsoft.com)
Date: 06/18/04


Date: Fri, 18 Jun 2004 08:59:10 -0700

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.

>-----Original Message-----
>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
>
>"carlor" <anonymous@discussions.microsoft.com> wrote in
message
>news:1e87801c45540$78f29c10$a001280a@phx.gbl...
>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.
>
>
>.
>



Relevant Pages

  • Re: DCount distinct date/time based on date only
    ... I say *unique* because the field contains a date/time but I ... need to ignore the timestamp and work off the date only. ... SELECT MINAs EarliestClass FROM Attendance ... SELECT MIN) As EarliestClass FROM Attendance ...
    (comp.databases.ms-access)
  • Re: Calculating with Variable Search
    ... If C2 is a date/time stamp what is the result of this formula: ... Microsoft Excel MVP ... that timestamp. ... They look at the data in each reading column and apply the ...
    (microsoft.public.excel.newusers)
  • Re: Update syntax error?
    ... if i update the timestamp it gives a syntax error:< timestamp is Date/Time ... Note, though, that the date will be interpreted as being in month/day/year format if that interpretation results in a valid date, even if you are accustomed to day/month/year format. ...
    (microsoft.public.access.formscoding)
  • Re: How to use TIMESTAMP
    ... Timestamp is NOT a date/time representation. ... If you want to capture ... an insert/update trigger. ...
    (microsoft.public.sqlserver.server)
  • Re: Access, MyODBC, MySQL Questions .....
    ... store the current date/time in the field. ... This is different than the SQL Server Timestamp field which automatically stores a binery representation of the current date/time that is not user usable. ...
    (comp.databases.ms-access)