<%
Function Getrannum ()
'****************************************
' Function name: getrannum
' Function: output random number with date format
' Parameter: no----
' Return value: such as Getrannum (), that is, output 200409071553464617, September 07, 2004 15:53 46 seconds 4617 Random number
' Association 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 digit bit left with 0 integer
' Parameters: Expression----to format integers
' Parameters: Digit----To format the number of digits
' Return value: such as 0005, such as Formatintnumber (5,4), integer 5 is formatted as 0005
' Association function: None
'****************************************
While Len (Expression) < Digit
Expression = "0" &expression
Wend
Formatintnumber = Expression
End Function
%><%
Function Getrannum ()
'****************************************
' Function name: getrannum
' Function: output random number with date format
' Parameter: no----
' Return value: such as Getrannum (), that is, output 200409071553464617, September 07, 2004 15:53 46 seconds 4617 Random number
' Association 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 digit bit left with 0 integer
' Parameters: Expression----to format integers
' Parameters: Digit----To format the number of digits
' Return value: such as 0005, such as Formatintnumber (5,4), integer 5 is formatted as 0005
' Association function: None
'****************************************
While Len (Expression) < Digit
Expression = "0" &expression
Wend
Formatintnumber = Expression
End Function
%>
Turn from: Dynamic Network production guide www.knowsky.com