Search Results

Calculations of time differences

Sometimes the columns in a data table show different time points, but what is interesting is not the actual start and stop points. Instead you want to know how long different time periods lasted.

The examples below illustrate how time functions can be used to calculate time differences.

DateDiff() function

The data table below lists start and stop times for a number of participants in a race.

The actual time points are not important, but their results are. By entering the expression

DateDiff('Minute', [Start], [Stop])

in the Add calculated column dialog, the time differences between the start and stop times are calculated, expressed in minutes.

DateTimeNow() function

The DateTimeNow() function returns the current system time. For example, this can be used to, in combination with the DateDiff function described above, calculate current ages of people, if their birth dates are known.

By entering the expression

DateDiff('year', [Date of birth], DateTimeNow())

in the Add calculated column dialog, the time differences between current system time and the dates of birth are calculated, expressed in years. (Current system time when the calculation below was performed was the 31st of October, 2018.)

Using a different version of Spotfire?
This help describes the web client version of Spotfire on TIBCO Cloud™. If you're looking for documentation for the installed client or other versions of Spotfire, visit the TIBCO Documentation Portal.

There you can find help for your version of Spotfire Analyst or Spotfire Business Author.