HI Jeff,

If friedrich doesn't have an easy answer using his built-in functions it would be an easy job to create the appropriate function and put it in a DLL and call the function from within the script and having the function return the relevant value. I can give you a hand if you need it.

Best Regards
Geoff Spillane
Data Down Under