Purpose Date calculations |
Background
info GuiXT uses the following rules for handling dates in computations, or comparisons with < or >: (1) Strings in the formats d.m.y, m/d/y, m-d-y, y.m.d, y/m/d, y-m-d are considered to be dates (2) A date in one of these date formats is automatically converted to an absolute number of days, before the calculation or comparison is carried out (3) If one adds or subtracts a number to/from a date, the result is formatted as a date again, using the same date format as the given date |
Example 1 Set V[mydate1] "01.01.2018" Set V[mydate2] "25.12.2018" Set V[diff] "&V[mydate2]" - "&V[mydate1]"Message "There are &V[diff] days between &V[mydate1] and &V[mydate2]" |
Sample
message 1 |
Example 2 Set V[mydate1] "12/06/2018" Set V[mydate2] "&V[mydate1]" + 1 Message "&V[mydate1] is followed by &V[mydate2]" |
Sample
message 2 |
Components |