Foxtable(狐表)用户栏目专家坐堂 → 公历农历如何互换


  共有2051人关注过本帖树形打印复制链接

主题:公历农历如何互换

帅哥,在线噢!
有点蓝
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:超级版主 帖子:106734 积分:542871 威望:0 精华:9 注册:2015/6/24 9:21:00
  发帖心情 Post By:2020/9/22 8:47:00 [显示全部帖子]

If e.DataCol.name = "公历日期" Then
    systemready = False
    If e.NewValue = Nothing Then
        e.DataRow("农历日期") = Nothing
    Else
        e.DataRow("农历日期") = (New Lunar(e.NewValue)).LunarDate
    End If
    systemready = True
ElseIf e.DataCol.name = "农历日期" Then
    systemready = False
    If e.NewValue = Nothing Then
        e.DataRow("公历日期") = Nothing
    Else
        Dim d As Date = e.NewValue
        e.DataRow("公历日期") = (New Lunar(d.Year,d.Month,d.Day,True)).SolarDate
    End If
    systemready = True
End If

至于是不是闰月,要自己建一个表,记录所有的闰月,然后查表判断

 回到顶部