0
私は現在下のクエリで作業していますが、私の結果はhh:mm
という形式で表示されます。 convert(char, mycolumnName, 108)
を使用していますが、結果はまだhh:mm:ss
と表示されています。私はhh:mm
が必要です。この結果を得る方法はありますか?hh:mm
?アドバイスをお願いします。事前にありがとうございます!時刻をshqlのhh:mmに変換する
select distinct
clientid, timein , timeout, calculation,
convert(char, calculation, 108) as CalculationResult
from
calculationTable
where
timein is not null and timeout is not null
出力:
Clientid timein timeout calculation CalculationResult
------------------------------------------------------------------------
0:00:00 05:00:00 1900-01-01 08:00:00 08:00:00
使用してみてください '変換(CHAR(5)、' – cha