Changes

Jump to: navigation, search

Expressions

810 bytes removed, 17:01, 21 May 2013
no edit summary
* '''First day of''': Return the first day of a grouping. This function have two variations:
** '''First''': Syntax: ''FIRST_DAY_OF(<constant_grouping>;<expression_date>)''. Need two parameters, the first is the constant grouping in which you want to obtain the first date: 0, 1, 2, 3 or 5 (see constants list) and the second is the anchor base date. Examples: FIRST_DAY_OF(0;DAY_FROM_TODAY(0)) - First first day of year (0) from today (DAY_FROM_TODAY(0)), FIRST_DAY_OF(1;"Order Date") - first day of month (1) based on the "Order Data";
** '''Second''': Syntax: ''FIRST_DAY_OF(<constant_grouping>;<constant_modify_date>;<modify_date_value>)''. Need three parameters, the first is the constant grouping in which you want to obtain the first date: 0, 1, 2, 3 or 5 (see constants list), the second is the modifier of the base date from today: 0, 1, 2, 3 or 5 (see constants list) and the third is the amount to change the modifier. Examples: FIRST_DAY_OF(1;0;-1) - first day of the current month (1) from last year (0;-1);
* '''Last day of''': Return the last day of a grouping. This function have two variations:
** '''First''': Syntax: ''LAST_DAY_OF(<constant_grouping>;<expression_date>)''. Need two parameters, the first is the constant grouping in which you want to obtain the last date: 0, 1, 2, 3 or 5 (see constants list) and the second is the anchor base date. Examples: LAST_DAY_OF(0;DAY_FROM_TODAY(0)) - Last last day of year (0) from today (DAY_FROM_TODAY(0)), LAST_DAY_OF(1;"Order Date") - last day of month (1) based on the "Order Data";
** '''Second''': Syntax: ''LAST_DAY_OF(<constant_grouping>;<constant_modify_date>;<modify_date_value>)''. Need three parameters, the first is the constant grouping in which you want to obtain the last date: 0, 1, 2, 3 or 5 (see constants list), the second is the modifier of the base date from today: 0, 1, 2, 3 or 5 (see constants list) and the third is the amount to change the modifier. Examples: LAST_DAY_OF(1;0;-1) - last day of the current month (1) from last year (0;-1);
* '''New date''': Create an object from a day, month and year. Syntax: ''NEW_DATE(<expression_day>;<expression_month>;<expression_year>)''. Need three parameters, the first is a valid day number (1 to 31), the second for a month (1 to 12) and the third is a year. The date is created from year to day, therefore, the day must be valid for the month and the year (considering 29/02, year must be bissextile). Examples: NEW_DATE(1;4;DATE_PART("Order Date";0)) - create the first day of april from the year determined by the current row "Order Date" column;
* '''Num of days''' Retorna o número de dias entre duas datas: Return the number of days between two dates. SintaxeSyntax: ''NUM_OF_DAYS(<expressão_data1expression_date1>;<expressão_data2expression_date2>) Exatamente dois parâmetros, sendo que ambos devem ser do tipo ''. Need two date datatype parameters. ExemplosExamples: NUM_OF_DAYS(FIRST_DAY_OF(0;"DataOrder Date");"DataOrder Date") - Retorna o número de dias entre o primeiro dia do ano baseado no ano da coluna returns the number of days between the first day of year based on the "DataOrder Date" está, até data da coluna column to the current day of the "DataOrder Date". column, NUM_OF_DAYS(FIRST_DAY_OF(1;"DataPay Date"); LAST_DAY_OF(1;"DataPay Date")) - Retorna o número de dias do mês em que a coluna returns the number of days of the month of the "DataPay Date" está.column;
* '''Num of months''' Retorna o número de meses entre duas datas: Return the number of months between two dates. SintaxeSyntax: ''NUM_OF_MONTHS(<expressão_data1expression_date1>;<expressão_data2expression_date2>) Exatamente dois parâmetros, sendo que ambos devem ser do tipo ''. Need two date datatype parameters. ExemplosExamples: NUM_OF_MONTHS(FIRST_DAY_OF(0;"DataDate");"DataDate") - Retorna o número de meses entre o primeiro dia do ano baseado no ano da coluna Return the number of months between the first day of the year of the "DataDate" está, até data da coluna column and the current month of the "DataDate".column;
* '''Previous date''' Retorna : Return the closest exact previous date given a anterior mais próxima dado um dia e um mêsday and month. SintaxeSyntax: ''PREVIOUS_DATE(<expressão_diaexpression_day>;<expressão_mêsexpression_month>) Exatamente dois parâmetros, sendo o primeiro o dia do mês e o segundo o mês. Cabe destacar que, no caso dos parâmetros serem 29 e fevereiro, o algoritmo considerará o último dia do mês''. Portanto, se o ano atual não bissextoNeed two parameters, o dia será modificado para 28 e depois será feito cálculo de data anteriorthe first is the day of month and the second the month. ExemplosExamples: PREVIOUS_DATE(1;4) - Retorna o return the closest ''01/04 anterior mais próximo'', ou sejain other words, até until "01/04/ano atualcurrent year" retorna o , returns "01/04/ano anteriorlast year", depois disso retorna after that returns "01/04/ano atualcurrent year".  == Exemplos ==  Alguns exemplos de expressões com operandos: Acrescentar 5% no valor de um campo: "F12_01" * 1.05 Retorno de valor booleano para identificar se uma data está dentro de limite máximo: "Data" <= "30/06/2011" Obter uma participação individual para uma coluna: "F12_01" / "@sum[F12_01]" Calcular uma variação percentual entre duas linhas de uma coluna: ("F12_01"-"@prev[F12_01]") / "@prev[F12_01]"

Navigation menu