Skip to content

MergeDate

aggregating category: date no `||`

Combines several integer or date components into a single date.

Combines integers and dates labelled with their role into a single output date. Each parameter is a two-entry array: the first entry is the field reference, the second is the role.

The supported roles are:

  • date (input type DATE)
  • time (input type DATE)
  • year (input type INT)
  • month (input type INT)
  • day (input type INT)
  • hour (input type INT)
  • minute (input type INT)
  • second (input type INT)

Parameters

1component1 Mandatory — accepts: array

Two-entry array [:field, "role"] — the field to use and its role in the merged date.

2component2 Mandatory — accepts: array

Two-entry array [:field, "role"] — the field to use and its role in the merged date.

Nextras Optional — accepts: array

Additional [:field, "role"] components, up to a total of six arrays.

Input type

  • DATE
  • INT

Output type

  • DATE

Requires

  • Roles must be one of date, time, year, month, day, hour, minute, or second.

Examples

Combine a date with a separate time-of-day

MergeDate([:start_date, "date"], [:start_hour, "time"])

Combine year/month/day/hour/minute/second

MergeDate([:year, "year"], [:month, "month"], [:day, "day"], [:hour, "hour"], [:minute, "minute"], [:second, "second"])

See also

DayFromDate, MonthFromDate, YearFromDate, HourFromDate, MinuteFromDate, SecondFromDate