Rss & SiteMap

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

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

标题:[求助]日期列拆分

1楼
myzy 发表于:2023/8/28 12:02:00
列一:2023-08-29 13:33:00    拆分成   列二:2023-08-29    列三:13:33   求代码?谢谢!
2楼
有点蓝 发表于:2023/8/28 13:31:00
列二、列三是字符列还是日期列?
3楼
myzy 发表于:2023/8/28 13:34:00
都是时间格式

4楼
有点蓝 发表于:2023/8/28 13:38:00
比如

If e.DataCol.Name = "列一" Then 
    If e.DataRow.IsNull("
列一"Then 
        e.
DataRow("
列二") = Nothing 
        e.
DataRow("
列三") = Nothing 
    
Else
dim d as date =e.DataRow("列一")
        e.
DataRow("
列二") = d.date
        e.
DataRow("
列三") = d
    End
 If
End
 
If

把列三改为time格式:http://www.foxtable.com/webhelp/topics/0044.htm
5楼
myzy 发表于:2023/8/28 15:49:00
请教,如果第三列是字符列,怎么改呢?

6楼
有点蓝 发表于:2023/8/28 15:50:00
e.DataRow("列三") = format(d,"HH:mm")

http://www.foxtable.com/webhelp/topics/0362.htm
共6 条记录, 每页显示 10 条, 页签: [1]

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

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