YEARQTR(A)
  • 1 Minute to read
  • Dark
    Light
  • PDF

YEARQTR(A)

  • Dark
    Light
  • PDF

Article summary

Date Transform: YEARQTR(A)

Extract the Year and Quarter from Date A in the format YYYYQ

Purpose

Use this function to:
  • Segment Transaction data into yearly quarters

Return Value

PropertyValue
FieldTypeInteger
FieldSizeMed
DataTypeDiscrete
DataSizeShort


Example Return Value:  20211,20191,20203

Parameters

ParameterJSONDescription
Table“targetTable”: “MyTableName”The target table on which the new field will be created
Filter“dataset”: {DataSet_JSON}Optional.   If a filter is applied, records not in the filter Recordset will be returned as null.
Date Function“p1”: “YEARQTR(A)”YEARQTR(A)
A“p2”: “DateTimeFieldName”
“p2”: “DateFieldName”
“p2”: “#YYYY-MM-DD HH:MM:SS”
“p2”: “#YYYY-MM-DD”
Required.  The date from which to extract the year and the quarter
Supports:  
  • DataType: Discrete / Continuous
  • Field Type: Date, DateTime
  • Fixed Value:  #YYYY-MM-DD,    e.g. #2021-04-05
  • Fixed Value:  #YYYY-MM-DD HH:MM:SS,    e.g. #2021-04-05 11:01:08

JSON Sample

Usage Notes

{Insert Notes Here}

Example

ExampleDetails
DescriptionSegment transaction data into yearly quarters
Input
  • Table: = [transactions]
  • Function: = DateTransform
  • DateTimeFunction: = YEARQTR(A)
  • A:= [transactions].[date]
  • Name: =YearQuarter
Sample



Was this article helpful?

What's Next