以文本方式查看主题 - Foxtable(狐表) (http://foxtable.com/bbs/index.asp) -- 专家坐堂 (http://foxtable.com/bbs/list.asp?boardid=2) ---- [求助]如何设置日期格式 (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=93815) |
-- 作者:lswwsl -- 发布时间:2016/12/7 18:40:00 -- [求助]如何设置日期格式 请教:在列属性里日期设为date格式,是年月日,但我只想日期为年和月的短格式,如何通过代码设置呢? |
-- 作者:有点蓝 -- 发布时间:2016/12/7 20:27:00 -- 参考:http://www.foxtable.com/webhelp/scr/0656.htm If e.Col.Name = "日期" AndAlso e.Row.IsNull("日期") = False Then e.Text = Format(e.Row("日期"),"yyyy年MM月") End If |