>>>>> "Silveira," == Silveira, Damien
> <damien.silveira@stripped> writes:
Silveira,> I am having a problem with DateTime field types the following will
Silveira,> show what is happening when I use them.
Silveira,> TIA,
MySQL> desc temp;
Silveira,> +-----------+----------+------+-----+---------------------+-------+
Silveira,> | Field | Type | Null | Key | Default | Extra |
Silveira,> +-----------+----------+------+-----+---------------------+-------+
Silveira,> | datefield | datetime | YES | | NULL | |
Silveira,> | dateonly | date | YES | | NULL | |
Silveira,> | autodate | time | YES | | NULL | |
Silveira,> | autodate1 | datetime | YES | | 0000-00-00 00:00:00 | |
Silveira,> +-----------+----------+------+-----+---------------------+-------+
Silveira,> 4 rows in set (0.00 sec)
mysql> Insert into temp (datefield) values (now());
Silveira,> Query OK, 1 row affected (0.00 sec)
mysql> select * from temp;
Silveira,> +---------------------+----------+----------+---------------------+
Silveira,> | datefield | dateonly | autodate | autodate1 |
Silveira,> +---------------------+----------+----------+---------------------+
Silveira,> | 0000-00-00 00:01:94 | NULL | NULL | 0000-00-00 00:00:00 |
Silveira,> +---------------------+----------+----------+---------------------+
Silveira,> 1 row in set (0.01 sec)
mysql> insert into temp (dateonly) values (now());
Silveira,> Query OK, 1 row affected (0.00 sec)
mysql> select * from temp;
Silveira,> +---------------------+------------+----------+---------------------+
Silveira,> | datefield | dateonly | autodate | autodate1 |
Silveira,> +---------------------+------------+----------+---------------------+
Silveira,> | 0000-00-00 00:01:94 | NULL | NULL | 0000-00-00 00:00:00 |
Silveira,> | NULL | 1999-10-21 | NULL | 0000-00-00 00:00:00 |
Silveira,> +---------------------+------------+----------+---------------------+
Silveira,> 2 rows in set (0.01 sec)
Hi!
If you are using Linux-Alpha, then switching to gcc 2.95.2 will fix
this problem!
Regards,
Monty
| Thread |
|---|
| • FW: DateTime Issue | Damien Silveira | 21 Oct |
| • FW: DateTime Issue | Michael Widenius | 12 Nov |