>>>>> "Daniel" == Daniel E White <igor@stripped> writes:
<cut>
Daniel> That is doing it a bit sideways, my friend.
Daniel> You want to avoid using the NOW() function to fill a TIME data-type.
Daniel> I found you need to use CURTIME() or CURRENT_TIME to get TIME_FORMAT to behave.
>
Daniel> Also, there are the DATE_FORMAT and TIME_FORMAT functions that allow for more
> flexibility.
Daniel> Observe:
Daniel> -------------------------
mysql> CREATE TABLE time_table (date_field DATE, time_field TIME, datetime_field
> DATETIME );
Daniel> Query OK, 0 rows affected (0.20 sec)
mysql> INSERT INTO time_table VALUES
-> ( NOW(), CURTIME(), NOW()) ,
-> ( NOW(), NOW(), NOW() );
Daniel> Query OK, 2 rows affected (0.03 sec)
Daniel> Records: 2 Duplicates: 0 Warnings: 0
mysql> select * from time_table ;
Daniel> +------------+------------+---------------------+
Daniel> | date_field | time_field | datetime_field |
Daniel> +------------+------------+---------------------+
Daniel> | 1999-09-14 | 20:49:01 | 1999-09-14 20:49:01 |
Daniel> | 1999-09-14 | 356:49:01 | 1999-09-14 20:49:01 |
Daniel> +------------+------------+---------------------+
Daniel> 2 rows in set (0.01 sec)
Hi
I have now fixed the problem with TIME columns in this context for the
next MySQL 3.23 version.
Regards,
Monty