<html>
<head><title>teste</title></head>
<body>
<%
Function getSize(ByVal Tamanho)
On Error Resume Next
Dim Retorno
Tamanho = CLng(Tamanho)
If IsNumeric(Tamanho) Then
If Tamanho >= 1073741824 Then
Retorno = Round(((Tamanho/1024)/1024)/1024,1)
Retorno = Retorno & " GB"
ElseIf Tamanho < 1073741824 And Tamanho >= 1048576 Then
Retorno = Round((Tamanho/1024)/1024,1)
Retorno = Retorno & " MB"
ElseIf Tamanho < 1048576 And Tamanho >= 1024 Then
Retorno = Round((Tamanho/1024),1)
Retorno = Retorno & " KB"
Else
Retorno = Round((Tamanho),1)
if Retorno > 1 then s = "s"
Retorno = Retorno &" Byte"&s
End If
Else
Retorno = "n/a"
End If
'Retornando a função
getSize = Retorno
End Function
%>
<%=getSize(1368391680)%>
</body>
</html>