SQL Server中GetDate()函数用于返回当前的时间和日期,返回值样式举例:2017/02/06 10:24:14。
应用示例:
'数据库链接定义省略
sql="SELECT GetDate() AS CurrentDateTime"
Set rs=Server.CreateObject("ADODB.RecordSet")
rs.open sql, conn, 1, 1
if not(rs.bof and rs.eof) then
Response.Write rs("CurrentDateTime")
end if
rs.close
set rs=nothing
上面代码的效果是利用MSSQL中GetDate()函数输出当前时间。
声明:如需转载,请注明来源于www.webym.net并保留原文链接:http://www.webym.net/jiaocheng/617.html





















