以文本方式查看主题

-  Foxtable(狐表)  (http://www.foxtable.com/bbs/index.asp)
--  专家坐堂  (http://www.foxtable.com/bbs/list.asp?boardid=2)
----  [求助]窗口中表Table1类型是SQLTable,其时间列只显示日期不显示时间,怎样才能显示日期时间?多谢!  (http://www.foxtable.com/bbs/dispbbs.asp?boardid=2&id=95780)

--  作者:ytzn
--  发布时间:2017/2/5 11:25:00
--  [求助]窗口中表Table1类型是SQLTable,其时间列只显示日期不显示时间,怎样才能显示日期时间?多谢!
如题
--  作者:ytzn
--  发布时间:2017/2/5 14:03:00
--  

SetDateTimeFormat

设置列的日期时间格式。

语法:

SetDateTimeFormat(Fmt)

Fmt:DateTimeFormatEnum型枚举,包括以下可选值:

Date:           标准日期格式,如"2008-12-31"
DateTime:       短日期时间格式,包括日期和时分,如"2008-12-31 9:45"
DateLongTime:   长日期时间格式,包括日期和时分秒,如"2008-12-31 9:45:30"
Time:           短时间格式,包括时分,如“12:59”
LongTime:       长时间格式,包括时分秒,如“12:59:21”

示例

DataTables("订单").DataCols("日期").SetDateTimeFormat(DateTimeFormatEnum.DateTime)


--  作者:ytzn
--  发布时间:2017/2/5 14:06:00
--  
DataTables("用车记录_Table1").DataCols("开始时间").SetDateTimeFormat(DateTimeFormatEnum.DateTime)
DataTables("用车记录_Table1").DataCols("结束时间").SetDateTimeFormat(DateTimeFormatEnum.DateTime)