PDA

View Full Version : Now() - ASP



mainmast
June 26th, 2003, 18:41
How would I put Now() in a insert statement as a value? I've even tried putting it in a variable and then placing the variable in the insert statement, but it doesnt work. Could anyone help me?
Thanks in advance

kabatak
June 27th, 2003, 09:55
are you talking about SQL insert ?

Ajiang
July 16th, 2003, 21:19
I encountered it sometimes.

ashben
July 19th, 2003, 01:52
Assuming that your database has a corresponding DateTime field, this should work:

sql = "insert '" & Now() & "' into YourTable"

The important thing is to wrap the DateTime stamp in single-quotes.

Hope it helps.