Date and Time Difference
- Author: J. Spitzmüller (c) 2025
- Menu: Table | Date and Time
Description
This tool converts various date and time formats into other date and time formats.
Supported input types:
| Specifier | Replaced by |
|---|
%H | Number of Hours |
%M | Number of Minutes |
%S | Number of Seconds |
%l | Number of Milliseconds |
%D | Number of Days |
%E | Number of Weeks |
%% | The percent character |
Note that, for example, the number of hours in the description above is not well defined: it can be either the total number of hours (for example, for a time span of 50 hours this would be 50) or just the hour part of the time span, which would be 2 in this case as 50 hours is equal to 2 days and 2 hours.wxTimeSpan resolves this ambiguity in the following way: if there had been, indeed, the D format specified preceding the H, then it is interpreted as 2. Otherwise, it is 50.
The same applies to all other format specifiers: if they follow a specifier of larger unit, only the rest part is taken, otherwise the full value is used.
Parameters
| | Name | Type | Identifier | Description | Constraints |
| Input | Table | table, input | TABLE | - | - |
| Output | Output | table, output, optional | OUTPUT | - | - |
| Options | Timepoint Field | table field | FIELD_TIMEPOINT | - | - |
| TimepointFormat | choice | FORMAT_TIMEPOINT | - | Available Choices:
[0] Set Date
[1] Set Date and Time
[2] SAGA Date Field Type
[3] Julian Day Number (JDN)
[4] Modified Julian Day Number (MJD)
[5] Unix Timestamp
Default: 0 |
| Timepoint Date | date
[GUI] | DATE_TIMEPOINT | - | Default: 2026-04-09 |
| Timepoint Time | text
[GUI] | TIME_TIMEPOINT | - | Default: 12:40:39 |
| Timepoint ISO Time | text
[CMD] | ISOTIME_TIMEPOINT | - | Default: 2026-04-09T12:40:39 |
| Subtrahent Field | table field | FIELD_SUBTRAHENT | - | - |
| SubtrahentFormat | choice | FORMAT_SUBTRAHENT | - | Available Choices:
[0] Set Date
[1] Set Date and Time
[2] SAGA Date Field Type
[3] Julian Day Number (JDN)
[4] Modified Julian Day Number (MJD)
[5] Unix Timestamp
Default: 0 |
| Subtrahent Date | date
[GUI] | DATE_SUBTRAHENT | - | Default: 2026-04-09 |
| Subtrahent Time | text
[GUI] | TIME_SUBTRAHENT | - | Default: 12:40:39 |
| Subtrahent ISO Time | text
[CMD] | ISOTIME_SUBTRAHENT | - | Default: 2026-04-09T12:40:39 |
| Output as | choice | OUTPUT_AS | - | Available Choices:
[0] Format
[1] Weeks
[2] Days
[3] Hours
[4] Minutes
[5] Seconds
[6] Milliseconds
Default: 0 |
| Format String | text | FORMAT_STRING | - | - |
| Make Timespan Absolute | boolean | ABSOLUTE | - | Default: 0 |
Command Line
Usage: saga_cmd table_tools 30 [-TABLE ] [-FIELD_TIMEPOINT ] [-FORMAT_TIMEPOINT ] [-ISOTIME_TIMEPOINT ] [-FIELD_SUBTRAHENT ] [-FORMAT_SUBTRAHENT ] [-ISOTIME_SUBTRAHENT ] [-OUTPUT ] [-OUTPUT_AS ] [-FORMAT_STRING ] [-ABSOLUTE ]
-TABLE: Table
table, input
-FIELD_TIMEPOINT: Timepoint Field
table field
-FORMAT_TIMEPOINT: TimepointFormat
choice
Available Choices:
[0] Set Date
[1] Set Date and Time
[2] SAGA Date Field Type
[3] Julian Day Number (JDN)
[4] Modified Julian Day Number (MJD)
[5] Unix Timestamp
Default: 0
-ISOTIME_TIMEPOINT: Timepoint ISO Time
text
[CMD]
Default: 2026-04-09T12:40:39
-FIELD_SUBTRAHENT: Subtrahent Field
table field
-FORMAT_SUBTRAHENT: SubtrahentFormat
choice
Available Choices:
[0] Set Date
[1] Set Date and Time
[2] SAGA Date Field Type
[3] Julian Day Number (JDN)
[4] Modified Julian Day Number (MJD)
[5] Unix Timestamp
Default: 0
-ISOTIME_SUBTRAHENT: Subtrahent ISO Time
text
[CMD]
Default: 2026-04-09T12:40:39
-OUTPUT: Output
table, output, optional
-OUTPUT_AS: Output as
choice
Available Choices:
[0] Format
[1] Weeks
[2] Days
[3] Hours
[4] Minutes
[5] Seconds
[6] Milliseconds
Default: 0
-FORMAT_STRING: Format String
text
-ABSOLUTE: Make Timespan Absolute
boolean
Default: 0