Login    Sites MenuBlueStep

BlueStep Platform Support

RelateScript
Outline full outline 
Overview 
Data Types 
Operators 
Statements 
Functions 
Data Conversion 
charCode(...) 
charVal(...) 
format(...) 
formatElapsedTime(...) 
getFormatter(...) 
join(...) 
parseFloat(...) 
parseInteger(...) 
readCSV(...)/readCSVRows(...) 
split(...) 
toDate(...) 
toDateDiff(...) 
toDateTime(...) 
toTime(...) 
String Functions 
HTML/CSS/JavaScript 
Array Functions 
Date/Time Functions 
Mathematical Functions 
Advanced Functions 
Restricted Functions 
Working with Relate Data 
How Formulas Work 
Related Topics 

The formatElapsedTime(...) function has four variations, not counting syntax variations, corresponding to the two types of data that it can format plus a short/long format option. The format function converts Integer values and DateDiff values into String values indicating elapsed time.

Syntax:
formatElapsedTime( integer-value )
formatElapsedTime(
datediff-value )
formatElapsedTime(
integer-value, abbrev )
formatElapsedTime(
datediff-value, abbrev )
integer-value.formatElapsedTime( )
datediff-value.formatElapsedTime( )
integer-value.formatElapsedTime( abbrev )
datediff-value.formatElapsedTime( abbrev )

Parameter Description
integer-value An Integer value representing elapsed milliseconds to be formatted and converted to a String value.
datediff-value The DateDiff value to be formatted and converted to a String value.
abbrev A boolean value indicating whether abbreviated units of measure should be used.  The default is true.

Example: To display the time elapsed since a particular timestamp use: formatElapsedTime(curDateTime() - timestamp);