From wiki.ginstr.com
Jump to: navigation, search
(Convert timestamp from certain widget)
m
Line 10: Line 10:
 
===Convert timestamp from certain widget===
 
===Convert timestamp from certain widget===
  
;<code>[gn:act_convertTimestampToFormat]|[source,target,format]</code>
+
:;<code>[gn:act_convertTimestampToFormat]|[source,target,format]</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
 
|-
 
|-
| [[source]]
+
| <code>[[source]]</code>
 
| [[source]] from where value for conversion will be retrieved
 
| [[source]] from where value for conversion will be retrieved
 
* Valid [[source|sources]]:
 
* Valid [[source|sources]]:
**[[Datatypes#text|text]]
+
**<code>[[Datatypes#text|text]]</code>
**[[Datatypes#date|date]]
+
**<code>[[Datatypes#date|date]]</code>
**[[Datatypes#dateTime|dateTime]]
+
**<code>[[Datatypes#dateTime|dateTime]]</code>
**[[Datatypes#time|time]]
+
**<code>[[Datatypes#time|time]]</code>
**[[Datatypes#number|number]]
+
**<code>[[Datatypes#number|number]]</code>
 
|-
 
|-
| [[target]]
+
| <code>[[target]]</code>
 
| [[target]] from where the while action is using value as expression comparsion parameter
 
| [[target]] from where the while action is using value as expression comparsion parameter
 
* Valid [[target|targets]]:
 
* Valid [[target|targets]]:
** [[Datatypes#text|text]]
+
** <code>[[Datatypes#text|text]]</code>
 
|-
 
|-
| format
+
| <code>format</code>
 
| format in which [[source]] value will be converted
 
| format in which [[source]] value will be converted
 
* Valid formats:
 
* Valid formats:
Line 39: Line 39:
  
 
====Example====
 
====Example====
<code>@+id/timeInDATA</code> - [[source]]<br>  
+
:<code>@+id/timeInDATA</code> - [[source]]<br>  
<code>@+id/clockTimeIn</code> - [[target]]<br>
+
:<code>@+id/clockTimeIn</code> - [[target]]<br>
<code>@string/screen3_timeFormat</code> - format e.g. <code>dd.MM.yyyy H:mm:ss</code><br><br>
+
:<code>@string/screen3_timeFormat</code> - format e.g. <code>dd.MM.yyyy H:mm:ss</code><br>
<code>[gn:act_convertTimestampToFormat]|[@+id/timeInDATA,@+id/clockTimeIn,@string/screen3_timeFormat]</code>
+
:; ⤷ <code>[gn:act_convertTimestampToFormat]|[@+id/timeInDATA,@+id/clockTimeIn,@string/screen3_timeFormat]</code>
 
<hr>
 
<hr>

Revision as of 13:48, 12 July 2017

gn:act_convertTimestampToFormat

Description
Action used to convert timestamp (numerical value) from certain widget to human readable format.
Action returns
void

Action signatures

Convert timestamp from certain widget

[gn:act_convertTimestampToFormat]|[source,target,format]
Parameter Description
source source from where value for conversion will be retrieved
target target from where the while action is using value as expression comparsion parameter
format format in which source value will be converted

Example

@+id/timeInDATA - source
@+id/clockTimeIn - target
@string/screen3_timeFormat - format e.g. dd.MM.yyyy H:mm:ss
[gn:act_convertTimestampToFormat]|[@+id/timeInDATA,@+id/clockTimeIn,@string/screen3_timeFormat]