function 返回的问题
我想把日期为“2007-1-1”的格式转换为“1Jan07”的格式,但是好象返回的值有问题,出不来,如果不以函数的形式直接调用下面的方法是可以的,所以不知道是不是函数的返回出了问题。下面是代码,高手帮忙找下原因。<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.
<html xmlns="http://www.
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
‘上面是DW自动生成的
<script language="vbscript">
function nowdate(ByVal string)
Dim dateArray
dateArray=Split(string,"-",-1,1)
set dateArray(0)=Right(dateArray(0), 2)
Select Case dateArray(1)
Case "1" set dateArray(1)= "Jan"
Case "2" set dateArray(1)="Feb"
Case "3" set dateArray(1)="Mar"
Case "4" set dateArray(1)="Apr"
Case "5" set dateArray(1)="May"
Case "6" set dateArray(1)="June"
Case "7" set dateArray(1)="July"
Case "8" set dateArray(1)="Aug"
Case "9" set dateArray(1)="Sept"
Case "10" set dateArray(1)="Oct"
Case "11" set dateArray(1)="Nov"
Case "12" set dateArray(1)="Dec"
end Select
nowdate=dateAarry(2)&dateArray(1)&dateArray(0)
end function
</script>
<title>无标题文档</title>
</head>
<body>
<script language="vbscript">
Dim st
st="2007-1-10"
st=nowdate(st)
msgbox st
</script>
</body>
</html>