<%
Function GetRanNum()
'****************************************
'Function name: GetRanNum
'Function: Output random numbers with date format
'Parameters: None ----
'Return value: such as GetRanNum(), which outputs 200409071553464617, which is 4617 random numbers at 15:53:46 on September 7, 2004
'Associated function: FormatIntNumber
'****************************************
GetRanNum = ""
GetRanNum = GetRanNum&FormatIntNumber(year(now),4)
GetRanNum = GetRanNum&FormatIntNumber(month(now),2)
GetRanNum = GetRanNum&FormatIntNumber(day(now),2)
GetRanNum = GetRanNum&FormatIntNumber(hour(now),2)
GetRanNum = GetRanNum&FormatIntNumber(minute(now),2)
GetRanNum = GetRanNum&FormatIntNumber(second(now),2)
randomize
ranNum=int((9000*rnd)+1000)
GetRanNum = GetRanNum&ranNum
End Function
Function FormatIntNumber(Expression,Digit)
'******************************************
'Function name: FormatIntNumber
'Function: Output an integer with 0 on the left side of the Digit bit
'Parameter: Expression ----Integer to be formatted
'Parameter: Digit ---- number of digits to be formatted
'Return value: such as 0005, such as FormatIntNumber(5,4), the integer 5 is formatted as 0005
'Associated function: none
'****************************************
While Len(Expression) < Digit
Expression = "0"&Expression
wend
FormatIntNumber = Expression
End Function
%><%
Function GetRanNum()
'****************************************
'Function name: GetRanNum
'Function: Output random numbers with date format
'Parameters: None ----
'Return value: such as GetRanNum(), which outputs 200409071553464617, which is 4617 random numbers at 15:53:46 on September 7, 2004
'Associated function: FormatIntNumber
'******************************************
GetRanNum = ""
GetRanNum = GetRanNum&FormatIntNumber(year(now),4)
GetRanNum = GetRanNum&FormatIntNumber(month(now),2)
GetRanNum = GetRanNum&FormatIntNumber(day(now),2)
GetRanNum = GetRanNum&FormatIntNumber(hour(now),2)
GetRanNum = GetRanNum&FormatIntNumber(minute(now),2)
GetRanNum = GetRanNum&FormatIntNumber(second(now),2)
randomize
ranNum=int((9000*rnd)+1000)
GetRanNum = GetRanNum&ranNum
End Function
Function FormatIntNumber(Expression,Digit)
'****************************************
'Function name: FormatIntNumber
'Function: Output an integer with 0 on the left side of the Digit bit
'Parameter: Expression ----Integer to be formatted
'Parameter: Digit ---- number of digits to be formatted
'Return value: such as 0005, such as FormatIntNumber(5,4), the integer 5 is formatted as 0005
'Associated function: none
'****************************************
While Len(Expression) < Digit
Expression = "0"&Expression
wend
FormatIntNumber = Expression
End Function
%>