SELECT Name,[Document Name], convert(datetime,[DEPARTURE] ,103) as DTA ,convert(datetime,[ARRIVAL],103 ) AS TIMO
INTO TEMP
from Timeless
SELECT DISTINCT[DOCUMENT NAME],NAME, (MAX (DTA)-MIN(TIMO)) AS HORO
FROM TEMP
GROUP BY [DOCUMENT NAME],NAME
DROP TABLE TEMP
这是脚本,我得到的输出是
DOCUMENT NAME NAME HORO
BH 1704031143460533600198 BH 0 12:05AM
以这种格式获取horo是不对的或不是我想要的 请帮助