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

Forum statistics

Threads
474,260
Messages
2,571,039
Members
48,768
Latest member
first4landlord

Latest Threads

Top