以文本方式查看主题

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

--  作者:yfy13338431925
--  发布时间:2021/4/10 16:47:00
--  实际完成日期怎么写

蓝老师:如何计算实际完成日期,不考虑润月


图片点击可在新窗口打开查看此主题相关图片如下:图片1.png
图片点击可在新窗口打开查看


--  作者:有点蓝
--  发布时间:2021/4/10 16:54:00
--  
参考:http://www.foxtable.com/webhelp/topics/1452.htm

If e.DataCol.Name = "任务下达时间" OrElse e.DataCol.Name = "完成时间" Then
    If
 e.DataRow.IsNull("
任务下达时间"OrElse e.DataRow.IsNull("完成时间"Then
        e.
DataRow("完成日期") = Nothing
    Else
dim s as string = e.DataRow("完成时间")
if s.endswith("年")
        e.
DataRow("完成日期") = e.DataRow("起始日期").Addyears(cint(s.replace("
","")))
elseif s.endswith("月")
        e.DataRow("完成日期") = e.DataRow("起始日期").Addmonths(cint(s.replace("","")))
elseif s.endswith("天")
        e.
DataRow("完成日期") = e.DataRow("起始日期").Adddays(cint(s.replace("
","")))
end if
    End If
End
 If

--  作者:yfy13338431925
--  发布时间:2021/4/10 17:18:00
--  
三刻有
--  作者:yfy13338431925
--  发布时间:2021/4/10 17:56:00
--  

0003-01-01 00:00:00
0001-01-02 00:00:00
0001-01-03 00:00:00

0001-01-02 00:00:00

,怎么结果是这样的?

 没有看懂加一列起始日期是什么意思

[此贴子已经被作者于2021/4/10 17:57:33编辑过]

--  作者:有点蓝
--  发布时间:2021/4/11 20:08:00
--  
"起始日期"改为"任务下达时间",抄帮助的代码,忘记改了