date and time problem

D

dave

I have written asp code to insert current date and time.
my database is in sql server 2000.
this is the sql query that i m using.

sql = "INSERT INTO tblDailyVisitLog
(UserID,DailyDate,DailyTime) VALUES
('test',"&formatdatetime(date,2)&",'"&formatdatetime
(date,3)&"')"

But when I checked in the database in date and time field
it shows "1/1/1900" in both fields.

any help would be appreciated..
thanx.
david
 
D

Dan Boylett

dave said:
I have written asp code to insert current date and time.
my database is in sql server 2000.
this is the sql query that i m using.

sql = "INSERT INTO tblDailyVisitLog
(UserID,DailyDate,DailyTime) VALUES
('test',"&formatdatetime(date,2)&",'"&formatdatetime
(date,3)&"')"

But when I checked in the database in date and time field
it shows "1/1/1900" in both fields.

REsponse.write your SQL statement so you can see exactly what is being
executed against the database
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,578
Members
45,052
Latest member
LucyCarper

Latest Threads

Top