get_elapsed_time
Calculate the elapsed time between two specified datetimes in customizable units (milliseconds to years) for precise duration measurement.
Instructions
Get the difference time between two datetimes (e.g. 2025-01-01 01:01:01 and 2025-01-02 02:02:02)
Input Schema
Name | Required | Description | Default |
---|---|---|---|
from | Yes | ||
to | Yes | ||
unit | No | millisecond |
Input Schema (JSON Schema)
{
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false,
"properties": {
"from": {
"type": "string"
},
"to": {
"type": "string"
},
"unit": {
"default": "millisecond",
"enum": [
"millisecond",
"second",
"minute",
"hour",
"day",
"week",
"month",
"year"
],
"type": "string"
}
},
"required": [
"from",
"to"
],
"type": "object"
}