以文本方式查看主题 - Foxtable(狐表) (http://foxtable.com/bbs/index.asp) -- 专家坐堂 (http://foxtable.com/bbs/list.asp?boardid=2) ---- 【求助】用年月表示时段 (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=120409) |
-- 作者:wangjx817 -- 发布时间:2018/6/14 15:52:00 -- 【求助】用年月表示时段 Select Case e.DataCol.name Case "退休日期" If e.DataRow.IsNull("退休日期") Then e.DataRow("距退休年月数") = Nothing Else Dim tp2 As TimeSpan = CDate(e.DataRow("退休日期")) - Date.today e.DataRow("距退休年月数") = Math.Round(tp2.TotalDays / 365.2422,2) End If End Select 上面代码执行以后显示的是年数 我想用”尚有几年几月几天退休“来表示
|
-- 作者:有点甜 -- 发布时间:2018/6/14 16:44:00 -- 参考
http://www.foxtable.com/webhelp/scr/2647.htm
|