What is your sql_mode set to?
I tried inserting that value into a timestamp column on our test server and it
works fine.
Regards
John Daisley
Mobile +44(0)7812 451238
Email j...@butterflysystems.co.uk
Certified MySQL 5 Database Administrator (CMDBA)
Certified MySQL 5 Developer
Cognos BI Develo
If you need a timestamp that is automatically updated when a record is
inserted, replaced, or updated, declare one field in the record as
TIMESTAMP:
create table mytable (
myvalue int default 0,
mytime TIMESTAMP
}
INSERT INTO mytable VALUES( 123, NULL );
-Original Message-
From: *Himer
> At 11:25 PM 12/4/01 -0700, *Himerus* wrote:
> >Can anyone give me a good link on how to put in a timestamp on a form
> >that inserts directly into a sql database??? I keep trying it, but it's
> >only coming thru as 00 , so on.
I enter my timestamp as a unix timestamp in an INT field
Hi,
Depends on what type of timestamp you are looking at. But
in general, you use the mysql built in function:
now() and if you want to convert that into unix_timestamp,
unix_timestamp(now()) will do the trick.
mysql> select now();
+-+
| now() |
+--