兵马俑开放时间:“2006-8-23” 怎么分别取出年,月,日

来源:百度文库 编辑:中科新闻网 时间:2024/05/11 03:38:01
date=“2006-8-23”为字符型
分别取出year,month,day。也是为字符型的
vbscript编写

year=left$(date,4)
month=mid$(date,6,1)
day=right$(date,2)

用split可以做到!

cstr(year(date))
cstr(month(date))
cstr(day(date))

用split

什么语言呀