0
使用VB6和MS Access如何獲得總時間?
表:
ID Lunch_Intime, Lunch_Outtime
001 13:00:00 14:00:00
002 12:00:00 13:00:00
003 12:00:00 15:00:00
004 14:00:00 16:00:00
等等...
Lunch_Intime, Lunch_Outtime column data type is text.
我想要得到的ID的Total_Lunch_Time。
嘗試查詢:
Select Lunch_Intime,
Lunch_Outtime,
Lunch_Outtime - Lunch_Intime as Total_Lunch_Time
from table
...但它顯示:
Total_Lunch_Time
#error
#error
於是就..,
如何使total_Lunch_Time
查詢?
預期產量。
ID Lunch_Intime, Lunch_Outtime Total_Lunch_Time
001 13:00:00 14:00:00 01:00:00
002 12:00:00 13:00:00 01:00:00
003 12:00:00 15:00:00 03:00:00
004 14:00:00 16:00:00 02:00:00
e.g: 選擇Lunch_Intime, Lunch_Outtime, CDATE(Lunch_Outtime) - CDATE(Lunch_Intime)作爲Total_Lunch_Time 從表 – 2009-09-16 05:31:15