oledb and dates in vb.net 2003



Hi,

I have an Access 2000 database that I'm loggin data to and need to store the
date/time of the logged data in a field. I can log the individual data
elements just fine but the date is knocking me around some. It keeps giving
me the standard 'Data type mismatch in criteria expression' error. I'm
attempting to insert via

timNow = DateTime.Now
strSQL = "INSERT INTO LOG1 (LogTime) VALUES ('#" & CType(timNow, String) &
"#')"

Help please. I've already wasted 4 hours on this

Thanks

Tom


.



Relevant Pages

  • Re: adding an interval to medium time control
    ... Date/Time values in Access are stored as 8 byte floating point numbers, ... If you're trying to store a duration, ... I have a control with ... field in the table formatted as medium time and the controls on the ...
    (microsoft.public.access.formscoding)
  • Re: Time Calculations
    ... I think this is an example of why Date/Time values should NOT be used to store ... to display it in hh:nn:ss appearance. ...
    (microsoft.public.access.queries)
  • Re: Covert number into time
    ... Access has a datatype of Date/Time. ... You can use this to store date and time ... > But the answer comes out at 48, because I have just minused the Seen time ...
    (microsoft.public.access.gettingstarted)
  • Re: Date Question
    ... "Jeff Boyce" wrote: ... To gain you the set of date/time related functions in Access, ... that you use the Date/Time data type to store it. ... I will never display this date in a form or report. ...
    (microsoft.public.access.tablesdbdesign)
  • Re: question
    ... Store the start date/time and end date/time as date/time values. ... The DateSerial function takes three arguments: Year, ... > have to calculate duration in hours. ...
    (microsoft.public.access.gettingstarted)

Loading