以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.com/bbs/index.asp)
--  专家坐堂  (http://foxtable.com/bbs/list.asp?boardid=2)
----  [求助]日期转换问题?  (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=32043)

--  作者:54292550
--  发布时间:2013/4/24 19:04:00
--  [求助]日期转换问题?

Dim t As Date
t = Date.Now
Output.Show(t)

 

 

输出结果为:2013.04.24 19:01:10

 

怎么转换为:20130424190110

(就是日期8位时间6位组成的)

 

 

 

 


--  作者:程兴刚
--  发布时间:2013/4/24 19:17:00
--  
Dim t As Date
t = Date.Now
Output.Show(t.Replace(".","").Replace(":",""))

--  作者:狐狸爸爸
--  发布时间:2013/4/24 19:17:00
--  
Dim t As Date
t = Date.Now
Output.Show(Format(t,"yyyyMMddHHmmss"))

--  作者:程兴刚
--  发布时间:2013/4/24 19:18:00
--  
还是您来的直接!
--  作者:程兴刚
--  发布时间:2013/4/24 19:20:00
--  
帮助里面居然没有!
--  作者:zoyong
--  发布时间:2018/3/3 19:23:00
--  
日期:20180303 19:22:18

怎么转换成     2018-03-03

--  作者:有点甜
--  发布时间:2018/3/4 15:06:00
--  
以下是引用zoyong在2018/3/3 19:23:00的发言:
日期:20180303 19:22:18

怎么转换成     2018-03-03

 

http://www.foxtable.com/bbs/dispbbs.asp?BoardID=2&ID=107627&skin=0