Reputation: 4350
using MSSQL 2008 and PHP, is it possible to capture the time at which a record was added to the database?
I thought the built in 'Timestamp' data type did this, but I'm getting some really weird hex like thing...
0x00000000000007D3
Any ideas how?
Upvotes: 1
Views: 75
Reputation: 139010
You can use a datetime
column with a default value getdate()
.
create table YourTable
(
Created datetime default getdate()
)
Upvotes: 3