Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How To Set Default Value to Now() ??? - Any Ideas ???

Status
Not open for further replies.

MarkDicken

IS-IT--Management
Jun 5, 2000
55
CH
I have a DateEntered Field and it is DATETIME. Is is possible to ask the default value to be Current Date And Time that the record was added.

I have managed to manually do this with PHP but I would like the Date/Time stamping to be done on the database end not the front end

Many Thanks In Advance ...

 
Try to change the column type to TIMESTAMP and give it an attribute of NOT NULL. I'm of the understanding that the default value will automatically be set to the current time of the record addition.

brendanc@icehouse.net
 
Thanks I'll give it a try, I did not know of a Field Type called TimeStamp existed ....

Cheers ...

Mark Dicken
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top