m (Mark moved page Gn:act convertTimestampToFormat to gn:act convertTimestampToFormat) |
|||
(12 intermediate revisions by 3 users not shown) | |||
Line 3: | Line 3: | ||
[[Category:Action_Library]] | [[Category:Action_Library]] | ||
− | + | ;Description: Action used to convert timestamp (numerical value) from certain widget to human readable format. Action by default formats time in relation to local timezone of user. | |
− | ; | + | ;Action returns: void |
+ | ==Action signatures== | ||
− | + | ===Convert timestamp from certain widget=== | |
− | ; | + | :;<code>[gn:act_convertTimestampToFormat]|[source,target,format]</code> |
− | + | with timezone | |
− | + | :;<code>[gn:act_convertTimestampToFormat]|[source,target,format,manualTimeZone]</code> | |
− | + | ||
− | ;<code>[gn:act_convertTimestampToFormat]|[ | + | :{| class="wikitable sortable" style="font-size: 85%; text-align: left;" |
− | == | + | |- |
− | + | ! scope="col" | Parameter | |
− | : | + | ! scope="col" | Description |
− | + | |- | |
− | + | | <code>[[source]]</code> | |
− | + | | [[source]] from where value for conversion will be retrieved | |
− | + | * Valid [[source|sources]]: | |
− | + | **<code>[[Datatypes#text|text]]</code> | |
− | :: | + | **<code>[[Datatypes#date|date]]</code> |
+ | **<code>[[Datatypes#dateTime|dateTime]]</code> | ||
+ | **<code>[[Datatypes#time|time]]</code> | ||
+ | **<code>[[Datatypes#number|number]]</code> | ||
+ | |- | ||
+ | | <code>[[target]]</code> | ||
+ | | [[target]] from where the while action is using value as expression comparsion parameter | ||
+ | * Valid [[target|targets]]: | ||
+ | ** <code>[[Datatypes#text|text]]</code> | ||
+ | |- | ||
+ | | <code>format</code> | ||
+ | | format in which [[source]] value will be converted | ||
+ | * Valid formats: | ||
+ | **[http://docs.oracle.com/javase/7/docs/api/java/text/SimpleDateFormat.html formats] | ||
+ | |- | ||
+ | | <code>manualTimeZone</code> | ||
+ | | timeZone in which timestamp will be shown. By default it's local timezone. If <code>DATE</code> datatype is used then default timezone is <code>GMT</code>. Valid timezones: | ||
+ | [https://docs.oracle.com/javase/7/docs/api/java/util/TimeZone.html timezone construct] | ||
+ | * Valid [[target|targets]]: | ||
+ | ** <code>[[Datatypes#text|text]]</code> | ||
+ | |- | ||
+ | |} | ||
+ | |||
+ | ====Example==== | ||
+ | :<code>@+id/timeInDATA</code> - [[source]]<br> | ||
+ | :<code>@+id/clockTimeIn</code> - [[target]]<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> | ||
+ | <hr> |
Latest revision as of 13:27, 4 November 2020
gn:act_convertTimestampToFormat
- Description
- Action used to convert timestamp (numerical value) from certain widget to human readable format. Action by default formats time in relation to local timezone of user.
- Action returns
- void
Action signatures
Convert timestamp from certain widget
[gn:act_convertTimestampToFormat]|[source,target,format]
with timezone
[gn:act_convertTimestampToFormat]|[source,target,format,manualTimeZone]
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 - Valid formats:
manualTimeZone
timeZone in which timestamp will be shown. By default it's local timezone. If DATE
datatype is used then default timezone isGMT
. Valid timezones:
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]
- ⤷