gn:act_createTimestampFromDate
- Description
- Action used to convert given day, month, year into a dateTime and stores it into a target
- Action returns
- void
Action signature
[gn:act_createTimestampFromDate]|[target,periodDescriptor,timeZone;dateForTimestampDay,dateForTimestampMonth,dateForTimestampYear]
Parameter Description target
target target to which dateTime will be stored. periodDescriptor (optional)
source source from which period information will be retrieved. Period descriptor describes which time in day will be set in dateTime
.- If parameter is omitted
begin
will be used as default value.
timeZone (optional)
source source from which period information will be retrieved. TimeZone which will be used during conversion of input values to dateTime
- If parameter is omitted
GMT
will be used as default value.
- Valid source:
- Valid values in source: see column canonicalID's
dateForTimestampDay (optional)
source source from which day information will be retrieved. Day which will be used during conversion of input values to dateTime
- If parameter is omitted day will be automatically set by
periodDescriptor
parameter. i.e. if day is not defined andperiodDescriptor
isend
, day will be last day in month
- i.e.
15
dateForTimestampMonth (optional)
source source from which month information will be retrieved. Month which will be used during conversion of input values to dateTime
- If parameter is omitted month will be automatically set by
periodDescriptor
parameter. i.e. if month is not defined andperiodDescriptor
isend
, month will be set to12
- i.e.
4
dateForTimestampYear (optional)
source source from which year information will be retrieved. Year which will be used during conversion of input values to dateTime
- If parameter is omitted year will be automatically set to current year.
- i.e.
2021
- If parameter is omitted
Examples
- Please note that examples result data is relative to date when example was written (10.09.2020).
variables
<variable id="timestampTarget" type="dateTime"/> <variable id="periodDescriptorId" type="text">end</variable> <variable id="timeZoneId" type="text">America/Caracas</variable> <variable id="dateForTimestampDayId" type="number">13</variable> <variable id="dateForTimestampMonthId" type="number">4</variable> <variable id="dateForTimestampYearId" type="number">2021</variable>
action signatures
usage1
<FrameLayout android:id="@+id/exampleFrame" android:layout_width="wrap_content" android:layout_height="wrap_content" android:visibility="gone" gn:act_set="[gn:act_createTimestampFromDate]|[@+id/act_createTimestampFromDateResult;]" />
after action execution result1
1577836800000 Wednesday, January 1, 2020 12:00:00 AM
usage2
<FrameLayout android:id="@+id/exampleFrame" android:layout_width="wrap_content" android:layout_height="wrap_content" android:visibility="gone" gn:act_set="[gn:act_createTimestampFromDate]|[@+id/act_createTimestampFromDateResult,@variable/periodDescriptorId;@variable/dateForTimestampDayId,@variable/dateForTimestampMonthId]" />
after action execution result2
1586822399999 Monday, April 13, 2020 11:59:59.999 PM
more short examples of signatures
<FrameLayout gn:act_set=" [gn:act_createTimestampFromDate]|[@+id/act_createTimestampFromDateResult;] [gn:act_createTimestampFromDate]|[@+id/act_createTimestampFromDateResult,,@variable/timeZoneId] [gn:act_createTimestampFromDate]|[@+id/act_createTimestampFromDateResult;,@variable/dateForTimestampMonthId] [gn:act_createTimestampFromDate]|[@+id/act_createTimestampFromDateResult;@variable/dateForTimestampDayId,@variable/dateForTimestampMonthId] [gn:act_createTimestampFromDate]|[@+id/act_createTimestampFromDateResult;@variable/dateForTimestampDayId,@variable/dateForTimestampMonthId,@variable/dateForTimestampYearId] [gn:act_createTimestampFromDate]|[@+id/act_createTimestampFromDateResult;@variable/dateForTimestampDayId,,@variable/dateForTimestampYearId]"/>