OutwardDateSort Command

Use the OutwardDateSort command in a Logic Template to sort results from closest to a defined base date and time to furthest from that date and time, using a field containing date-time values. The date-time values are sorted using the absolute value of the difference between each date and time and the defined base date and time. Sorting granularity is one minute.

To execute a Outward Date-Time Sort request, use the OutwardDateSort command with three arguments:

OutwardDateSort( fld, trgt, pas );

OutwardDateSort Arguments

Argument

Description

fld

The date-time data field on which to sort.

trgt

The HTML variable containing the base date-time around which to sort.

pas

The pass during which the sort is to be executed.

Access the OutwardDateSort Dialog Box by selecting the Date-Time->Outward menu item under the Sorting category of the Logic Template editor command menu.

Examples

Command

Description

Time = "8:00 pm";

OutwardDateSort( _ShowTime, Time, 1);

Sort results by the field "_ShowTime" around the time 8:00 pm during pass 1.

IF ( Time )

 OutwardDateSort( _ShowTime, Time, 2);

ENDIF

Sort results by the field "_ShowTime" around the value stored in the HTML variable "Time" during pass 2 if the value is non-zero.