VBA如何将时间从十进制到十进制舍入5分钟

时间:2017-05-12 19:36:00

标签: vba datetime time rounding

请你帮我解决VBA中的代码,将时间缩短到5分钟。我已经使用了其中一些功能而没有成功。

        varSheetTimeCard.Cells(iRow, 3) = WorksheetFunction.MRound(varSheetTimeDoctorReport.Cells(iRow, 7), "0:05")
    varSheetTimeCard.Cells(iRow, 3) = Math.Round(varSheetTimeDoctorReport.Cells(iRow, 8) * 288, 0) / 288
    varSheetTimeCard.Cells(iRow, 3) = dhRoundTime(varSheetTimeDoctorReport.Cells(iRow, 7), 5)
    varSheetTimeCard.Cells(iRow, 3) = WorksheetFunction.MRound(varSheetTimeDoctorReport.Cells(iRow, 7), "0:05")
    varSheetTimeCard.Cells(iRow, 3) = WorksheetFunction.MRound(varSheetTimeDoctorReport.Cells(iRow, 7), 1 / 288)

The figure below shows three columns, First column is the input and 3rd column is the desired output

0 个答案:

没有答案