Function to get number of minutes between 2 dates.

HI Forum,

I am trying to write a UDS to calculate the number of minutes between 2 dates.

I created a function in a vbscript and works fine, but when i try to use (save) the script in Sage i get an invalid Syntax error.

Is it possible to create functions in a UDS ?

Regards,

Manuel Roman

Parents Reply Children
  • in reply to mroman

    There is a way around this. Structure the script like this:

    End Sub ' this will cause the end of the sub started in the wrapper Kevin refers to 

    Function myFunction

    ...

    End Function

    Sub myFix  ' this will be ended by the End Sub created by the wrapper.