From wiki.ginstr.com
Jump to: navigation, search
Line 8: Line 8:
 
==Action signatures==
 
==Action signatures==
  
=== ===
+
===Convert timestamp from certain widget===
  
;<code>[gn:act_convertTimestampToFormat]|[@+id/sourceWidget,@+id/targetWidget,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;"
Line 17: Line 17:
 
! scope="col" | Description
 
! scope="col" | Description
 
|-
 
|-
| [[source|parameterSource]]
+
| [[source]]
| [[source]] from where the while action is using value as expression parameter
+
| [[source]] from where value for conversion will be retrieved
 
* Valid [[source|sources]]:
 
* Valid [[source|sources]]:
** any [[source]]
+
**[[Datatypes#date|date]]
 +
**[[Datatypes#dateTime|dateTime]]
 +
**[[Datatypes#time|time]]
 
|-
 
|-
| [[source|comparedSource]]
+
| [[target]]
| [[source]] 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 [[source|sources]]:
+
* Valid [[target|targets]]:
** any [[source]]
+
** [[DtText]]
 +
|-
 +
| format
 +
| format in which [[source]] value will be converted
 +
* Valid formats:
 +
**[http://docs.oracle.com/javase/7/docs/api/java/text/SimpleDateFormat.html formats]
 
|-
 
|-
 
|}
 
|}
Line 32: Line 39:
 
<code></code> - <br>
 
<code></code> - <br>
 
<code></code> - <br><br>
 
<code></code> - <br><br>
<code></code>
+
<code>[gn:act_convertTimestampToFormat]|[@+id/timeInDATA,@+id/clockTimeIn,@string/screen3_timeFormat]</code>
 
<hr>
 
<hr>
  

Revision as of 14:47, 3 March 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

-
-

[gn:act_convertTimestampToFormat]|[@+id/timeInDATA,@+id/clockTimeIn,@string/screen3_timeFormat]




gn:act_convertTimestampToFormat

gn:act_convertTimestampToFormat is used to convert timestamp (numerical value) from certain widget to human readable format.

Can be used on widgets
any widget
Event trigger for action
no event, must be used in action set or conditional action.
Can be used as
a no event action
Additional required attributes on bound widget
none
Additional required attributes on other widgets
none

Action signature

[gn:act_convertTimestampToFormat]|[@+id/sourceWidget,@+id/targetWidget,format]

Value field content

sourceWidget
defines widget from which data is retrieved for conversion.
Currently implemented for:
targetWidget
widget into which converted timestamp will be stored.
Currently implemented for:
format
acceptable formats can be found here
i.e. "dd.MM.yyyy hh:mm"