Today's date in Access

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: James (anonymous_at_discussions.microsoft.com)
Date: 06/20/04


Date: Sun, 20 Jun 2004 00:10:17 -0700

How can I use a form button to insert today's date in a
table, to leave a transction log?

I have tried putting the current date in a SQL string
that I run with doCmd in VBA, but if the data type in the
table is date/time, I get rubbish (31/12/1899, or some
such). It looks OK if I change the data type in the
table to string, but I need it to be a date type for
calculation.

This would be dead easy in Oracle.

Thanks

James



Relevant Pages

  • Re: Todays date in Access
    ... It looks OK if I change the data type in the ... you've failed to properly delimit the date value with hash-marks, ... or else clearly specify the value as a date literal (in US format), ... That would give you this SQL string: ...
    (microsoft.public.access.formscoding)
  • Re: Todays date in Access
    ... By the way, 31/12/1899 isn't rubbish, it's the ... James wrote: ... > I have tried putting the current date in a SQL string ... It looks OK if I change the data type in the ...
    (microsoft.public.access.formscoding)
  • Re: Todays date in Access
    ... My problem was syntax, which your SQL string fixed. ... James Mc ... It looks OK if I change the data type in the ...
    (microsoft.public.access.formscoding)
  • Re: Todays date in Access
    ... you could use the after udate event: ... I don't see oracle, or any other platform being less lines of code. ... > I have tried putting the current date in a SQL string ... It looks OK if I change the data type in the ...
    (microsoft.public.access.formscoding)
  • Re: Decimal Arithmetic
    ... James J. Weinkam wrote in message ... ... >>> data type. ... >has a true INTEGER data type, the following is true of any INTEGER expression: ...
    (comp.lang.pl1)