From wiki.ginstr.com
Jump to: navigation, search
(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<br><br>
+
:<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<br><br>
+
:<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 variable
      • START_TODAY - sets timestamp of beginning of current day into variable
      • START_TODAY_GMT - sets timestamp of beginning of current day as GMT into variable
      • START_TOMORROW - sets timestamp of beginning of next day into variable
      • START_TOMORROW_GMT - sets timestamp of beginning of next day as GMT into variable
      • END_TODAY - sets timestamp of end of current day into variable
      • END_TOMORROW - sets timestamp of end of next day into variable

Example

@variable/currentTime - target
now - 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)

Example

@variable/currentTime - target
calculation - keyword
now-43200000 - expression
[gn:act_setTimestampToVar]|[@variable/nowMinus12h,calculation;now-43200000]