Non mi sembra corretta f; tu vuoi ottenere una media al minuto, quindi devi dividere il tempo trascorso per 60000. Inoltre, ti serve tutto in formato stringa?
Normalmente è meglio usare i Long: oraattuale = DateTime.Now
I think f shoud be:
Dim f As Double = (DateTime.TimeParse(oraattuale) - DateTime.TimeParse(orapemem)) / 60000
' Do you need orapemem be a string? Can you not use a Long like StartTime = DateTime.Now?
Also, you should not use that Replace (eventually, you should use AHNumeric in AHLocale library)
Anyway, what is the log of:
log(NumberFormat(f, 1, 1))
?