Dear all,
I already create table $table_name
mysql>desc $table_name
+---------------+--------------+------+-----+-------------------+-------+
| Field | Type | Null | Key | Default
| Extra |
+---------------+--------------+------+-----+-------------------+-------+
| arrival | timestamp | YES | |
CURRENT_TIMESTAMP | |
| resolved | timestamp | YES | | NULL
| |
mysql>select arrival,resolved from $table_name
+---------------------+---------------------+
| arrival | resolved |
+---------------------+---------------------+
| 2006-11-21 08:37:31 | 2006-12-08 10:36:47 |
| 2006-12-01 11:41:57 | 2006-12-01 15:35:00 |
+---------------------+---------------------+
2 rows in set (0.00 sec)
When i try to get result from (resolved - arrival)
mysql>mysql> select
arrival,resolved,(resolved-arrival) as result from
$table_name limit 0,
2;
+---------------------+---------------------+----------+
| arrival | resolved | result
|
+---------------------+---------------------+----------+
| 2006-11-21 08:37:31 | 2006-12-08 10:36:47 | 87019916
|
| 2006-12-01 11:41:57 | 2006-12-01 15:35:00 | 39343
|
+---------------------+---------------------+----------+
2 rows in set (0.11 sec)
result is
resolved-arrival=20061201153500-20061201114157=39343
HOw to get timestamp value ?
thx
Deden
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com