Differences

This shows you the differences between two versions of the page.

Link to this comparison view

expression function - year 2-digit [2016/09/14 18:19]
expression function - year 2-digit [2016/09/14 18:19] (current)
Line 1: Line 1:
 +====== Year 2 Digit (Expression Function) ======
  
 +===== Purpose =====
 +The **Year 2 Digit** function (YEAR_2_DIGIT) generates a number that represents the year in 2 digit format for a timestamp provided in a given timezone. ​
 +
 +{{:​yeah_4_digit_initial.png?​direct&​600|}}
 +
 +===== Parameters =====
 +The **Year 2 Digit** function has two parameters, one of which is required:
 +
 +==== Timestamp ====
 +
 +Allowed Inputs: [[Field|field]] value or a number representing a Unix timestamp.
 +
 +There are several sources of Unix timestamps available. ​ For example the stored value of a [[Field Type - Date|date]] or [[Field Type - Date Time| date time]] field is a Unix timestamp. ​ Also When using the advanced interface the output of the [[Expression Function - Date|date]] or [[Expression Function - Date and Time| date time]] expression function is a Unix timestamp.
 +
 +==== Timezone ====
 +
 +Allowed Inputs: [[Field|field]] value or a text string
 +
 +The second optional parameter of the **Year 2 Digit** function is a string that represents the timezone. ​ Either use the  query builder to choose a field that contains the value or use type a value to enter a number. ​ The value should be based on the tz (timezone) database used by Linux and other Unix system in the form “Area/​Location” e.g. "​America/​New_York"​. ​ If no value is provided then the current user's timezone is used.
 +
 +===== Output =====
 +
 +The output of the **Year 2 Digit** function is number representing the Year in 2 digit format for the value of the timestamp provided in a given timezone.
 +===== Example =====
 +
 +For example YEAR_2_DIGIT(1357009728,"​America/​New_York"​) would result in "​12"​ and YEAR_2_DIGIT(1357009728,"​Asia/​Tokyo"​) would result in "​13"​.
expression function - year 2-digit.txt · Last modified: 2016/09/14 18:19 (external edit)
Copyright WorkXpress, 2024