以文本方式查看主题

-  Foxtable(狐表)  (http://www.foxtable.com/bbs/index.asp)
--  专家坐堂  (http://www.foxtable.com/bbs/list.asp?boardid=2)
----  请问数字列怎么转换为时间值?  (http://www.foxtable.com/bbs/dispbbs.asp?boardid=2&id=85305)

--  作者:lovebc299
--  发布时间:2016/5/23 9:38:00
--  请问数字列怎么转换为时间值?
例如,我A列是一个数值列,B列为时间列,我想让B列等于早晨8点+A列(分钟数)=8:A
--  作者:大红袍
--  发布时间:2016/5/23 9:41:00
--  

DataColChanged事件

 

If e.DataCol.Name = "A" Then
    If e.DataRow.isnull("A") Then
        e.DataRow("B") = Nothing
    Else
        Dim d As Date = #8:00#
        e.DataRow("B") = d.AddMinutes(e.DataRow("A"))
    End If
End If


--  作者:lovebc299
--  发布时间:2016/5/23 10:04:00
--  
谢谢