好会理财网页登录:关于时间的asp代码!

来源:百度文库 编辑:中科新闻网 时间:2024/05/11 16:19:52
rs("news_year")=year(Date)
rs("news_month")=month(Date)
rs("news_day")=day(Date)
if Instr(Time,"下午")>0 then
tmp=left(right(Time,8),2)+12
rs("news_time")=tmp&right(Time,6)
else
rs("news_time")=tmp&right(Time,8)
end if

谁帮我解释一下这几句的意思 我刚学 谢谢!

year是取年份
month取月份
day取天
比如year("2006-4-16")返回"2006"
下面那几句是12小时制和24小时制的转换