TIMESTAMP, at least by the book in front of me, is only valid from January 1, 1970 to December 31, 2037. I want to avoid using something that could create a Y2037 issue, if whatever I build ends up lasting that long. To me, that is a potential hazard and thus would be a bad habit to get into.

Is there another method, besides relying on the application being built, to insert "NOW()" into a MySQL DB?

   Again, thanks for any assistance.
   -Rob

Peter Lovatt wrote:

<>hi

you might want to look at TIMESTAMP which does it all for you.

Peter


...but doesn't.

I am attempting to create a table using the following...


CREATE TABLE INVOICE ( INV_NUMBER INT PRIMARY KEY, CUS_CODE INT NOT NULL REFERENCES CUSTOMER(CUS_CODE), INV_DATE DATETIME DEFAULT NOW() NOT NULL, );

I receive an error message stating that there is an error with 'NOW()'

Which doesn't make sense to me. I understand both Oracle and MS-SQL
Server use a similar format for putting the date and time into a field
when a new row is created. At least that is my goal.

Is there a very different method of doing this under MySQL 4.0.21?

Thanks for any assistance you may offer.




--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]



Reply via email to