以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.com/bbs/index.asp)
--  专家坐堂  (http://foxtable.com/bbs/list.asp?boardid=2)
----  将将一个A列的1987.08格式 B列显示1987年8月  (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=97141)

--  作者:guimingze
--  发布时间:2017/3/6 21:20:00
--  将将一个A列的1987.08格式 B列显示1987年8月
将将一个A列的1987.08格式  B列显示1987年8月
--  作者:有点蓝
--  发布时间:2017/3/6 21:34:00
--  
DataColChanged事件

If e.DataCol.Name = "A列" Then \'
    If e.NewValue Is Nothing Then \'
        e.DataRow("B列") = Nothing \'
    Else
        e.DataRow("B列") = e.NewValue.replace(".","年") & "月"
    End If
End If

--  作者:guimingze
--  发布时间:2017/3/6 22:22:00
--  回复:(有点蓝)DataColChanged事件If e.DataCol.Nam...
但是生成的是1987年08月啊 老师 怎么去掉0呢
--  作者:有点蓝
--  发布时间:2017/3/6 22:38:00
--  
e.DataRow("B列") = e.NewValue.replace(".0","年").replace(".","年")  & "月"
--  作者:guimingze
--  发布时间:2017/3/6 23:13:00
--  回复:(有点蓝)e.DataRow("B列") = e.NewValue.repl...
谢谢老师