在asp中使用format的问题

时间:2025-04-01 07:54:22
<%
    Function Format(vExpression, sFormat)
 
        set fmt = CreateObject("")
        = sFormat
 
        set rs = CreateObject("")
        "fldExpression", 12 ' adVariant
 
       
       
 
        set rs("fldExpression").DataFormat = fmt
        rs("fldExpression").Value = vExpression
 
        Format = rs("fldExpression").Value
 
        : Set rs = Nothing: Set fmt = Nothing
 
    End Function
 
    ' sample usage:
  "<br>"
  now & "<br>"
  "<br>"
    format(now(), "yyyy-mm-dd hh:mm:ss")
    "<br>"
    format(time(), "hh:mm")
%>

相关文章