|
| howto insert today's date into access? Fra : Morten F. Klausen |
Dato : 29-01-01 11:43 |
|
Hi!
I'm going to insert today's date into Access 2000! -How?
I've used now(), date() in the insert line, but non of will just use the
date (both of them also use the time!) (for instance to insert 28.01.2001
into access 2000!)
What format should I use in the date field in Access 2000, to combine a
function that will work with the insert sentence in ASP?
So my question is:
If some of you have done this; please tell me how (with access 2000 and
ASP!)
Do some of you know, so please tell me how!!!???
I would be delighted to hear from you!!
Best regards
Morten
| |
Allan Jensen (29-01-2001)
| Kommentar Fra : Allan Jensen |
Dato : 29-01-01 12:05 |
|
>I'm going to insert today's date into Access 2000! -How?
>
>I've used now(), date() in the insert line, but non of will just use the
>date (both of them also use the time!) (for instance to insert 28.01.2001
>into access 2000!)
>What format should I use in the date field in Access 2000, to combine a
>function that will work with the insert sentence in ASP?
>
>So my question is:
>
>If some of you have done this; please tell me how (with access 2000 and
>ASP!)
In ASP you use the function date(). Then you have the value for your
SQL sentence (I'm assume you use an SQL sentence to add data to the
database). But you need to be aware of that the date in the SQL _has_
to be in US format, that means in the month, day, year order. Access
will then handle it according to the regional settings you have on
your computer.
In Access the datatype should be a date/time and the format should be
one where you only show the data and not the time. If you format your
date in both date and time Access will show both no matter how the
value came in in the first place.
| |
|
|