' Collection of code snippets by Arne Vajhøj 
' (likely posted to comp.os.vms/INFO-VAX, INFO-TPU, MACRO32, eksperten.dk, newz.dk, LinkedIn or other place sometime between 1990 and now) 
Function delta(t)
    min = datediff("n", t, now())
    If min < 60 Then
        delta = min & " minutter"
    ElseIf min < 24*60 Then
        delta = (min \ 60) & " timer"
    Else
        delta = (min \ (24*60)) & " dage"
    End If
End Function

t = "7-Sep-2011 12:10"
WScript.Echo delta(t)
