找出下面ASP页面代码中的错误,仅限于ASP页面开发人员:

来源:百度知道 编辑:UC知道 时间:2024/06/08 03:26:35
找出下面ASP页面代码中的错误,仅限于ASP页面开发人员:
<%@Language="VBScript"%>
<%Option Explicit%>
<%
Dim objCom ' COM 对象
Dim objXML ' XMLDocument 对象
Dim strXmlRet ' 组件返回的 XML 字符串
Dim strXML

objCom = CreateObject("FZ3_Audit.UnitQuery")
strXML = objCom.RsQryAuditListD("44010607030046")
objCom = Nothing
%>

<%
'//+------------------------------------
'// 将yyyymmdd型字符串转换成以下格式
'// yyyy年mm月dd日 (iFormat = 0)
'// yyyy/mm/dd (iFormat = 1)
'// yyyy-mm-dd (iFormat = 2)
'//-------------------------------------
Public Function FormatDate(strDate, iFormat)
Dim strYear, strMonth, strDay
Dim strResult

If Len(strDate) <> 8 Then
FormatDate = strDate
Exit Function
En

<%@Language="VBScript"%>
<%Option Explicit%>
<%
Dim objCom ' COM 对象
Dim objXML ' XMLDocument 对象
Dim strXmlRet ' 组件返回的 XML 字符串
Dim strXML

Set objCom = Server.CreateObject("FZ3_Audit.UnitQuery")
strXML = objCom.RsQryAuditListD("44010607030046")
Set objCom = Nothing
%>

<%
'//+------------------------------------
'// 将yyyymmdd型字符串转换成以下格式
'// yyyy年mm月dd日 (iFormat = 0)
'// yyyy/mm/dd (iFormat = 1)
'// yyyy-mm-dd (iFormat = 2)
'//-------------------------------------
Public Function FormatDate(strDate, iFormat)
Dim strYear, strMonth, strDay
Dim strResult

If Len(strDate) <> 8 Then
FormatDate = strDate
Exit Function
End If ' (1)

strYear = Mid(strDate, 1, 4)
strMonth = Mid(strDate, 5, 2)
strDay = Mid(strDate, 7, 2)