SQL Server datetime now() error


I’ve set up a new SQL Server database and am trying to put a date/time stamp in one of my table fields.

I used to use enterprise manager to build my tables, when I used to select ‘datetime’ as the data type then enter ‘now()’ into the defult value field. This would mean that any new record inserted into the table had a date and time stamp at the time it is entered.

However, using SQL Server Management Studio Express, I get the error

“Error validating the default for column ‘MyTimeDateColumn’”

when I try to do this. How can I get it to work!?

Thanks very much for any pointers.

I think it’s getdate() instead of now()

You think right! Thanks Stefan.