关于显示时间问题,请老师帮忙
function News()dim rs,sql,i,NewsName,SmallPicPath,ProductNo,ClickNumber
set rs = server.createobject("adodb.recordset")
sql="select ID,NewsName,SortID from sk_News where ViewFlag order by id desc"
rs.open sql,conn,1,1
if rs.bof and rs.eof then
response.write " 无数据"
else
response.write" "
for i=1 to 7
if rs.eof then exit for
response.write" "
if StrLen(rs("NewsName"))<=48 then
NewsName=rs("NewsName")
else
NewsName=StrLeft(rs("NewsName"),45)
end if
response.write " <div><a href=NewsView.asp?ID="&rs("ID")&"&SortID="&rs
("SortID")&".html>· "&NewsName&" </div>"
if i mod 2 = 0 then
end if
rs.movenext
next
end if
rs.close
set rs=nothing
end function
%>
此段代码准备调用在首页,代码中结果只能显示标题NewsName,因为是新闻,想标题和时间一起显示,时间为addtime,不知如何添加在这段代码中,请高手们帮助.