方法一:
函数abc
dim d1 as date = args(0)dim d2 as date = args(1)
return (d2 - d1).days
外部调用
e.DataRow("使用天数") = Functions.Execute("abc",e.DataRow("起始日期"),e.DataRow("结束日期"))
方法二
函数abc:
dim dr as DataRow = args(0)
dim d1 as date = dr("起始日期")
dim d2 as date = dr("结束日期")
dr("使用天数") = (d2 - d1).days
外部调用
Functions.Execute("abc",e.DataRow)