Function orario(hhmmss) Dim ore, minuti, secondi, Resto If hhmmss > 24 Then hhmmss = hhmmss - 24 'If hhmmss <= 0 Then hhmmss = abs(hhmmss) If hhmmss <= 0 Then hhmmss = hhmmss+24 NumSecondi = hhmmss * 3600 ore = Int(NumSecondi / 3600) Resto = NumSecondi - (ore * 3600) minuti = Int(Resto / 60) Resto = NumSecondi - (ore * 3600) secondi = int(Resto - (minuti * 60)) decimali= resto-minuti*60-secondi if decimali > 0.5 then secondi = secondi+1 end if if secondi =60 then secondi=0 minuti=minuti+1 end if If minuti = 60 Then minuti = 0 ore = ore + 1 end if if ore < 10 then h = " 0"& Formatnumber(ore,0) &" : " else h = " " & Formatnumber(ore,0) &" : " end if if minuti < 10 then m = "0"& Formatnumber(minuti,0) &" : " else m = Formatnumber(minuti,0) &" : " end if if secondi < 10 then s = "0"& Formatnumber(secondi,0) else s = Formatnumber(secondi,0) end if orario = h & m & s End Function Function mt(mmss) Dim minuti, secondi, Resto Dim StringaMinuti, StringaSecondi, Tempo NumSecondi = Abs(mmss) * 60 minuti = Int(NumSecondi / 60) secondi = NumSecondi - (minuti * 60) if formatnumber(secondi,1)=60.0 then secondi = 0 minuti=minuti+1 end if StringaMinuti = Formatnumber(minuti,0) StringaSecondi = Formatnumber(secondi,1) If mmss < 0 Then mt = "- " & StringaMinuti & " m " & StringaSecondi & " s " Else mt = "+ " & StringaMinuti & " m " & StringaSecondi & " s " End If End Function function gg() gg=day(date) end function function min() min=(month(date)) end function function aa() aa=(year(date)) end function function intero(x) intero=Int(x) end function