以文本方式查看主题

-  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=53096)

--  作者:洗衣粉
--  发布时间:2014/6/29 17:58:00
--  怎么获得列里面农历日期的公历日期
代码可以这样写吗?

Dim ln As New Lunar(e.Row("生日"))
Dim d As Date = ln.SolarDate

--  作者:洗衣粉
--  发布时间:2014/6/29 17:59:00
--  
这样写,系统说调用出错
--  作者:有点甜
--  发布时间:2014/6/29 18:03:00
--  

看是不是这个问题,有的行没有 生日。

 

Dim d As Date
If Date.TryParse(d, e.Row("生日")) Then
    Dim ln As New Lunar(d)
    d = ln.SolarDate

    \'其它代码
End If