@TimeMerge (Formula Language)

Builds a time-date value from separate date, time, and time zone values.

Note: This @function is new with Release 6.

Syntax

@TimeMerge( date ; time ; timeZone )

Parameters

date

Time-date value or time-date list. The date you want to include in the new date-time value.

time

Time-date value or time-date list. The time you want to include in the new date-time value.

timeZone

String. Optional. The canonical time zone value you want to apply to the new date-time value. You can use a Time zone field to create this value.

Return value

Time-date

A new time-date value or time-date list made up of the date, time, and zone supplied as function parameters.

Usage

If the first or second parameter is a list, the function operates pair-wise on the list elements, and the return value is a list with the same number of elements as the larger list.

Examples

  1. This code, when added to a hostpot button, displays 02/23/2002 05:45:00 AM in the Merged date dialog box if the field date contains 02/23/02 and the field time contains 17:45:00.
    @Prompt([OK];"Merged date";@Text(@TimeMerge(date;time)))
  2. This code, when added to a form action, displays 02/23/2002 05:45:00 AM in the Merged date dialog box if the field date contains 02/23/02 02:30:00 and the field time contains 03/23/03 05:45:00.
    @Prompt([OK];"Merged date";@Text(@TimeMerge(date;time)))
  3. This code, when added to a hotspot button, displays 07/04/2002 08:30:00 PM in the Merged date dialog box if the field date contains 07/04/02, the field time contains 13:30:00, and the field zone contains Z=11$DO=0$ZX=1$ZN=Samoa (which displays as GMT-11:00). The hour is adjusted to reflect the specified time zone.
    @Prompt([OK];"Merged date";@Text(@TimeMerge(date;time;zone)))
  4. This code displays 01/01/2008 05:14 AM and 02/14/2008 07:45 PM in a list.
    @TimeMerge([1:1:2008] : [2/14/2008]; [5:14 AM] : [7:45 PM])