Differences

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

Link to this comparison view

expression function - date [2016/09/14 18:19]
expression function - date [2016/09/14 18:19] (current)
Line 1: Line 1:
 +====== Date (Expression Function) ======
  
 +===== Purpose =====
 +The **Date** function (DATE) generates a Unix timestamp from the Year, Month, Day, and Timezone provided at 12:00 AM. 
 +
 +{{:​date_initial.png?​direct&​600|}}
 +
 +===== Parameters =====
 +The **Date** function has four parameters, three of which is required:
 +
 +==== Year ====
 +
 +Allowed Inputs: [[Field|field]] value or number
 +
 +The first required parameter is the number that represents the year.  The year should be completely written out "​97"​ will be interpreted literally and is not a short form of 1997.  Either use the use the [[Query Builder]] to choose a field that contains the value or use type a value to enter a number.
 +
 +==== Month ====
 +
 +Allowed Inputs: [[Field|field]] value or a number
 +
 +The second parameter of the **Date** function is the number that represents the month. ​ Either use the  query builder to choose a field that contains the value or use type a value to enter a number. ​ Only numeric representations of the month are accepted "​January"​ is an invalid input. If a value provided is greater than 12 or less than 0 then the month and the year will be changed to accommodate that value for example if the month value is 13 and the year is 2012 then it will be treated as the month 1 and the year 2013.
 +
 +==== Day ====
 +
 +Allowed Inputs: [[Field|field]] value or a number
 +
 +The third parameter of the **Date** function is the number that represents the day of the month. ​ Either use the  query builder to choose a field that contains the value or use type a value to enter a number. ​ If a value provided is outside the range for the month provided then the month and the day will be changed to accommodate that value for example if the month value is 9 and the day is 32 then it will be treated as the month 10 and the day 2.
 +
 +==== Timezone ====
 +
 +Allowed Inputs: [[Field|field]] value or a text string
 +
 +The fourth parameter of the **Date** 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 **Date** function is number representing the Unix timestamp for the values given.
 +
 +===== Example =====
 +
 +For example DATE(2012,​10,​2,"​America/​New_York"​) would result in 1349150400.
expression function - date.txt · Last modified: 2016/09/14 18:19 (external edit)
Copyright WorkXpress, 2024