TIA,
There is no way I know of to automatically (unless anyone else knows better??) insert the current datetime in to a table open within EM unless the COLUMN has a default constraint set using the SQL getdate() function.
Your other options are:
- Write a SQL INSERT statement such as below which captures the current datetime using the getdate function:
INSERT INTO tablename (column1, column2, datetimecolumn) VALUES('Value1', 'Value2', getdate())
- Modify your table to have a default constraint set (as mentioned above):
ALTER TABLE tablename ADD CONSTRAINT 'constraintname' DEFAULT (getdate())
It's worth noting that adding a constraint could have undue effects across the capture of dates and times within your database as if a datetime is not specified the current datetime will be captured by default.
- Your last option is to be lazy and simply add the datetime in yourself in the correct format:
30/03/2005 17:01:33
Hope this helps,
Lloyd