Inserting datetime data

hi,
could any one tell me how to insert datetime data into SQL server2000,
i am trying the following
ex:

Insert into tablename values ('dsdf',24/11/2005 9:18,'jklj')
it keeps telling me incorrect syntax near 9. i used the GETDATE() function and it worked, but i want another way, because i want to insert the time taken from asp page using js and when using :
[code]
var cd=new Date();
var sql="Insert into tablename values ('dsdf',"+cd+")"
[/code]
it keeps giving me a lengthy error about variable constants allowed and stuff. Can any body help. 10x in advance.

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories