|
 |
asp_databases thread: Office 2000 Access Date/time column value = 12/31/1899 ?
Message #1 by hfsharon@h... on Mon, 8 Oct 2001 04:34:43
|
|
I created a table with a Date/time column "datecreated". I wrote a sql
insert statement to insert "Date" as the value. I use response.write to
check the sql insert statement and it had showed the system date in the
sql insertment. But when I open the office 2000 Access table, the value is
not system date, it showed 12/31/1899. Any one can tell me why? How to
solve the problem?
Message #2 by "Ken Schaefer" <ken@a...> on Mon, 8 Oct 2001 16:44:49 +1000
|
|
Did you use # delimiters?
INSERT INTO
table1
(
datefield
)
VALUES
(
#8/10/2001#
)
Cheers
Ken
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
From: <hfsharon@h...>
Subject: [asp_databases] Office 2000 Access Date/time column value
12/31/1899 ?
: I created a table with a Date/time column "datecreated". I wrote a sql
: insert statement to insert "Date" as the value. I use response.write to
: check the sql insert statement and it had showed the system date in the
: sql insertment. But when I open the office 2000 Access table, the value is
: not system date, it showed 12/31/1899. Any one can tell me why? How to
: solve the problem?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Message #3 by hfsharon@h... on Tue, 9 Oct 2001 00:13:00
|
|
I did not use a constant value. I use Date Variable -- system date! Can I
still use #?
I use
sqlinsert="insert into table1 (datefield) values ( "& Date & ")"
> Did you use # delimiters?
>
> INSERT INTO
> table1
> (
> datefield
> )
> VALUES
> (
> #8/10/2001#
> )
>
> Cheers
> Ken
>
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> From: <hfsharon@h...>
> Subject: [asp_databases] Office 2000 Access Date/time column value
> 12/31/1899 ?
>
>
> : I created a table with a Date/time column "datecreated". I wrote a sql
> : insert statement to insert "Date" as the value. I use response.write to
> : check the sql insert statement and it had showed the system date in the
> : sql insertment. But when I open the office 2000 Access table, the
value is
> : not system date, it showed 12/31/1899. Any one can tell me why? How to
> : solve the problem?
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
Message #4 by "Ken Schaefer" <ken@a...> on Tue, 9 Oct 2001 13:02:35 +1000
|
|
<%
strSQL = _
"INSERT INTO table1 " & _
"(datefield)" & _
"VALUES(" & _
"#" & Date() & "#)"
Response.Write(strSQL)
%>
Cheers
Ken
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
----- Original Message -----
From: <hfsharon@h...>
To: "ASP Databases" <asp_databases@p...>
Sent: Tuesday, October 09, 2001 12:13 AM
Subject: [asp_databases] Re: Office 2000 Access Date/time column value
12/31/1899 ?
: I did not use a constant value. I use Date Variable -- system date! Can I
: still use #?
: I use
:
: sqlinsert="insert into table1 (datefield) values ( "& Date & ")"
:
: > Did you use # delimiters?
: >
: > INSERT INTO
: > table1
: > (
: > datefield
: > )
: > VALUES
: > (
: > #8/10/2001#
: > )
: >
: > Cheers
: > Ken
: >
: > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
: > From: <hfsharon@h...>
: > Subject: [asp_databases] Office 2000 Access Date/time column value
: > 12/31/1899 ?
: >
: >
: > : I created a table with a Date/time column "datecreated". I wrote a sql
: > : insert statement to insert "Date" as the value. I use response.write
to
: > : check the sql insert statement and it had showed the system date in
the
: > : sql insertment. But when I open the office 2000 Access table, the
: value is
: > : not system date, it showed 12/31/1899. Any one can tell me why? How to
: > : solve the problem?
: > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Message #5 by David Cameron <dcameron@i...> on Tue, 9 Oct 2001 10:09:10 +1000
|
|
enclose it in # delimiters. This must be done for all dates in Access, even
if you got the date from system.
regards
David Cameron
nOw.b2b
dcameron@i...
-----Original Message-----
From: hfsharon@h... [mailto:hfsharon@h...]
Sent: Tuesday, 9 October 2001 10:13 AM
To: ASP Databases
Subject: [asp_databases] Re: Office 2000 Access Date/time column value
12/31/1899 ?
I did not use a constant value. I use Date Variable -- system date! Can I
still use #?
I use
sqlinsert="insert into table1 (datefield) values ( "& Date & ")"
> Did you use # delimiters?
>
> INSERT INTO
> table1
> (
> datefield
> )
> VALUES
> (
> #8/10/2001#
> )
>
> Cheers
> Ken
>
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> From: <hfsharon@h...>
> Subject: [asp_databases] Office 2000 Access Date/time column value
> 12/31/1899 ?
>
>
> : I created a table with a Date/time column "datecreated". I wrote a sql
> : insert statement to insert "Date" as the value. I use response.write to
> : check the sql insert statement and it had showed the system date in the
> : sql insertment. But when I open the office 2000 Access table, the
value is
> : not system date, it showed 12/31/1899. Any one can tell me why? How to
> : solve the problem?
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
|
|
 |