Tinderbox v10 Icon

minute(aDate, minutesNum)


Operator Type: 

Operator Scope of Action: 

Operator Purpose: 

Data Type Returned: 

Operator First Added: 

Operator in Current Baseline: 

Operator Last Altered: 

Operator Has Newer Dot-Operator Variant: 

 Function  [other Function type actions]

 Item  [operators of similar scope]

 Date-time  [other Date-time operators]

 Date [about Date data type]

 v5.7.0

 Baseline

 As at baseline

Yes


minute(aDate, minutesNum)

creates a new date based on the aDate expression, but in which the minute is minutesNum. The source Date is not changed unless aDate is an attribute and the attribute is re-setting itself:

$MyDateA = minute($MyDate,14); $MyDate is not changed
$MyDate = minute($MyDate,14); $MyDate is changed

Examples. If $MyDate is 4 July 2009 09:30, then

$MyDateA=minute($MyDate,5); 

will change $MyDate to 4 July 2009 19:05 whilst leaving $MyDate as 4 July 2009 09:30. However, if the code is self-referring:

$MyDate=minute($MyDate,5); 

will change $MyDate to 4 July 2009 19:05.

Take care using the later self-referring form in a $Rule or agent as it fires every agent update cycle adding 5 minutes each time! Make sure you use a guard agent or conditional query to make the action out of scope after the first application. Or, consider using a Stamp, which only fires once per (manual) application.

The single-argument method that reads the minutes value is documented separately: see minute(Date).


See also—notes linking to here: