If you want the date and time,
INSERT table(column) VALUES(CURRENT_TIMESTAMP)
If you just want the date:
INSERT table(column) VALUES({fn CURDATE()})
Better yet, make this the default for the table, then you don't even have to
mention that table in the INSERT statement... try this out in query
analyzer.
CREATE TABLE blat
(
foo INT,
bar SMALLDATETIME DEFAULT {fn CURDATE()},
splunge DATETIME DEFAULT CURRENT_TIMESTAMP
)
INSERT blat(foo) VALUES(1)
INSERT blat(foo) VALUES(2)
SELECT foo, bar, splunge FROM blat
DROP TABLE blat
And for future db-related questions, please post to the asp.db group.
--
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/
"Phil Powell" <so*****@erols.com> wrote in message
news:1c**************************@posting.google.c om...
The date field I believe is of type datetime, but I'm sorry I have
absolutely no idea how to put today's date into a datetime column
using ASP and SQL Server.
Folks, I'm a LINUX guy!!! This is a project I have to get done today
and that is about the only thing snagging it from being done before
COB today.
Please help.
Thanx
Phil