//Yellow198267的方法是通用并且可行的,我写了一个将秒转化为小时的四舍五入函数,lz可以参考一下
'***************************************************************************
'* @outline 秒から小時に転化
'* @author エイジス株式会社
'* @startdate 2006/08/29
'* @param itime (I/ ) 秒
'*
'* 説明文 秒から小時に転化
'***************************************************************************
Private Function getHour(ByVal itime As String) As String
Try
Dim a As Double = itime
Dim b As Double = 3600.0
Dim c As Double = (a / b)
Dim f As Integer
If (c <> Fix(c)) Then
Dim d As String = c.ToString.Substring(c.ToString.IndexOf("."))
If Val("0" & d) >= 0.5 Then
f = Fix(c) + 1
Else
f = Fix(c)
End If
Else
f = Fix(c)
End If
Return f.ToString()
Catch ex As Exception
MessageBox.Show(ex.ToString())
End Try