> Hello
> 
> Whats the easiest way to automatically add the current date to a record
> whenever a new record is inserted?  I have tried 
> CREATE TABLE ....
>   TimeStamp DATE NOT NULL DEFAULT 'DATE()'
>   ...); 
> But this doesn't work.  I have tried with TIMESTAMP type instead and
> this too doesn't work I just get about 14 0's.  Any ideas please

A TIMESTAMP column ought to do exactly what you're
looking for. 

Don't specify it as NOT NULL, don't set a default 
value. If you still have problems, try posting the 
exact CREATE or ALTER statement that you use, and
don't forget to tell us which version of MySQL
you're using.

/ Carsten
--
Carsten H. Pedersen
keeper and maintainer of the bitbybit.dk MySQL FAQ
http://www.bitbybit.dk/mysqlfaq



---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to