(→Set calculated timestamp to variable) |
m (formatting) |
||
Line 10: | Line 10: | ||
===Set timestamp to variable=== | ===Set timestamp to variable=== | ||
− | ;<code>[gn:act_setTimestampToVar]|[target,value]</code> | + | :;<code>[gn:act_setTimestampToVar]|[target,value]</code> |
− | {| class="wikitable sortable" style="font-size: 85%; text-align: left;" | + | :{| class="wikitable sortable" style="font-size: 85%; text-align: left;" |
|- | |- | ||
! scope="col" | Parameter | ! scope="col" | Parameter | ||
! scope="col" | Description | ! scope="col" | Description | ||
|- | |- | ||
− | | [[target]] | + | | <code>[[target]]</code> |
| [[target]] where the value will be stored | | [[target]] where the value will be stored | ||
* Valid [[target|targets]]: | * Valid [[target|targets]]: | ||
** [[:Category:Variables|variable]] | ** [[:Category:Variables|variable]] | ||
− | *** [[Datatypes#number|number]] | + | *** <code>[[Datatypes#number|number]]</code> |
− | *** [[Datatypes#dateTime|dateTime]] | + | *** <code>[[Datatypes#dateTime|dateTime]]</code> |
− | *** [[Datatypes#date|date]] | + | *** <code>[[Datatypes#date|date]]</code> |
|- | |- | ||
− | | value | + | | <code>value</code> |
| numeric value or keyword which is used to generate value | | numeric value or keyword which is used to generate value | ||
* Valid value: | * Valid value: | ||
Line 41: | Line 41: | ||
====Example==== | ====Example==== | ||
− | <code>@variable/currentTime</code> - target<br> | + | :<code>@variable/currentTime</code> - target<br> |
− | <code>now</code> - keyword | + | :<code>now</code> - keyword<br> |
− | <code>[gn:act_setTimestampToVar]|[@variable/currentTime,now]</code> | + | :; ⤷ <code>[gn:act_setTimestampToVar]|[@variable/currentTime,now]</code> |
<hr> | <hr> | ||
===Set calculated timestamp to variable=== | ===Set calculated timestamp to variable=== | ||
− | ;<code>[gn:act_setTimestampToVar]|[target,value;expression]</code> | + | :;<code>[gn:act_setTimestampToVar]|[target,value;expression]</code> |
− | {| class="wikitable sortable" style="font-size: 85%; text-align: left;" | + | :{| class="wikitable sortable" style="font-size: 85%; text-align: left;" |
|- | |- | ||
! scope="col" | Parameter | ! scope="col" | Parameter | ||
! scope="col" | Description | ! scope="col" | Description | ||
|- | |- | ||
− | | [[target]] | + | | <code>[[target]]</code> |
| [[target]] where the value will be stored | | [[target]] where the value will be stored | ||
* Valid [[target|targets]]: | * Valid [[target|targets]]: | ||
** [[:Category:Variables|variable]] | ** [[:Category:Variables|variable]] | ||
− | *** [[Datatypes#number|number]] | + | *** <code>[[Datatypes#number|number]]</code> |
− | *** [[Datatypes#date|date]] | + | *** <code>[[Datatypes#date|date]]</code> |
− | *** [[Datatypes#dateTime|dateTime]] | + | *** <code>[[Datatypes#dateTime|dateTime]]</code> |
|- | |- | ||
− | | value | + | | <code>value</code> |
| numeric value or keyword which is used to generate value | | numeric value or keyword which is used to generate value | ||
* Valid value: | * Valid value: | ||
** <code>CALCULATION</code> keyword | ** <code>CALCULATION</code> keyword | ||
|- | |- | ||
− | | expression | + | | <code>expression</code> |
| calculation expression (e.g. now-43200000) | | calculation expression (e.g. now-43200000) | ||
|- | |- | ||
Line 74: | Line 74: | ||
====Example==== | ====Example==== | ||
− | <code>@variable/currentTime</code> - target<br> | + | :<code>@variable/currentTime</code> - target<br> |
− | <code>calculation</code> - keyword<br> | + | :<code>calculation</code> - keyword<br> |
− | <code>now-43200000</code> - expression | + | :<code>now-43200000</code> - expression<br> |
− | <code>[gn:act_setTimestampToVar]|[@variable/nowMinus12h,calculation;now-43200000]</code> | + | :; ⤷ <code>[gn:act_setTimestampToVar]|[@variable/nowMinus12h,calculation;now-43200000]</code> |
<hr> | <hr> |
Revision as of 15:57, 12 July 2017
gn:act_setTimestampToVar
- Description
- Action used to load special timestamp values to variable which are defined by keywords, or hardcoded value.
- Action returns
- void
Action signatures
Set timestamp to variable
[gn:act_setTimestampToVar]|[target,value]
Parameter Description target
target where the value will be stored value
numeric value or keyword which is used to generate value - Valid value:
- hardcoded value (any
long
number) - keyword
NOW
- sets current timestamp into variableSTART_TODAY
- sets timestamp of beginning of current day into variableSTART_TODAY_GMT
- sets timestamp of beginning of current day as GMT into variableSTART_TOMORROW
- sets timestamp of beginning of next day into variableSTART_TOMORROW_GMT
- sets timestamp of beginning of next day as GMT into variableEND_TODAY
- sets timestamp of end of current day into variableEND_TOMORROW
- sets timestamp of end of next day into variable
- hardcoded value (any
- Valid value:
Example
@variable/currentTime
- targetnow
- keyword
- ⤷
[gn:act_setTimestampToVar]|[@variable/currentTime,now]
- ⤷
Set calculated timestamp to variable
[gn:act_setTimestampToVar]|[target,value;expression]
Parameter Description target
target where the value will be stored value
numeric value or keyword which is used to generate value - Valid value:
CALCULATION
keyword
expression
calculation expression (e.g. now-43200000) - Valid value:
Example
@variable/currentTime
- targetcalculation
- keywordnow-43200000
- expression
- ⤷
[gn:act_setTimestampToVar]|[@variable/nowMinus12h,calculation;now-43200000]
- ⤷