Skip to Main Content
Spotfire Ideas Portal
Status Future Consideration
Product Spotfire
Created by Guest
Created on Nov 14, 2016

Divide a Timespan with an Integer

When working in mobile data, we need to divide Communication time (timespan) with number of Call (Integer).

Today the solution provide with conversion are far too complex for users.

  • Attach files
  • Guest
    Reply
    |
    Nov 28, 2016

    Temp Solution:

    Register A Expression Function that does the conversions, save it to the library. Users can then load in the function to any new analysis, or have a template analysis saved with the function.

    Example:

    Expression Name: DivideTimeSpan
    Description: Convert timespan to hours and divide by integer

    DivideTimeSpan <- function(TimeSpan,Divisor)
    {
    (Days(TimeSpan)*24 +Hours(TimeSpan)+ Minutes(TimeSpan) /60 + Seconds(TimeSpan)/3600)/Divisor
    }