Rss & SiteMap

Foxtable(狐表) http://www.foxtable.com

新一代数据库软件,完美融合Access、Foxpro、Excel、vb.net之优势,人人都能掌握的快速软件开发工具!
共5 条记录, 每页显示 10 条, 页签: [1]
[浏览完整版]

标题:如何用代码求年月?

1楼
yanzhen2010 发表于:2011/8/31 22:31:00
如何用代码求年月?
学习并使用了表达式求年、月,但不知如何用代码求年、月。

请指教,或指示例子出处。
2楼
狐狸爸爸 发表于:2011/8/31 22:37:00

http://www.foxtable.com/help/topics/1337.htm

 

3楼
c 发表于:2011/8/31 22:38:00

用表达式计算年月

 

http://www.foxtable.com/help/topics/1285.htm

4楼
c 发表于:2011/8/31 22:44:00
我又理解错了。
5楼
yanzhen2010 发表于:2011/8/31 22:53:00
谢谢大家,原来用代码求年月比表达式更好,更容易领会。

If e.DataCol.Name = "住院号" Then
    If e.DataRow.IsNull("住院号") Then
        e.DataRow("sys_简码") = Nothing
        e.DataRow("sys_年") = Nothing
        e.DataRow("sys_月") = Nothing
    Else
        e.DataRow("sys_简码") =left(e.DataRow("患者姓名"),1)
        e.DataRow("sys_年") =year(e.DataRow("开嘱日期"))
        e.DataRow("sys_月") =month(e.DataRow("开嘱日期"))
    End If
End If
共5 条记录, 每页显示 10 条, 页签: [1]

Copyright © 2000 - 2018 foxtable.com Tel: 4000-810-820 粤ICP备11091905号

Powered By Dvbbs Version 8.3.0
Processed in .02344 s, 2 queries.