1. Metrics
  2. Time From Date

Metrics

Time From Date

Calculates time elapsed from one date to another. Useful for durations, SLA measurements, aging reports, and deadline tracking.

Basic usage

Save the last timestamp when an action was executed on a stub.

loading...

Parameters

category
optional
string

This is a grouping of metric within the stub.metrics root.


fieldname
required
string

This is the fieldname to which the data will be written to in stub.metrics.


time_unit
optional
string

This is the time unit to be used.
The following values are accepted: seconds, minutes, hours, days, weeks, months, years.

Default: seconds


from_date_field
required
string

This is the date string to be used as the starting point for the calculation.

Default: now


to_date_field
optional
string

This is the date string to be used as the ending point for the calculation.

Default: now