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

MONTH(A)

  • Dark
    Light
  • PDF

Article summary

Date Transform: MONTH(A)

Returns the month portion of Date A as a value from 1 to 12

Purpose

Use this function to:
  • Extract the numeric month of the year from a date
  • Extract the numeric month of the year from a time-stamp

Return Value

PropertyValue
FieldTypeInteger
FieldSizeLow
DataTypeDiscrete
DataSizeShort


Example Return Value: 1 to 12

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.
DateTimeFunction“p1”: “MONTH(A)”MONTH(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 month
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

See also YEAR(A), DOY(A), WOY(A)

Example

ExampleDetails
DescriptionStore Shipping month as numeric value
Input
  • Table: = [transactions]
  • Function: = DateTransform
  • DateTimeFunction: = MONTH(A)
  • A:= [transactions].[dtShipping]
  • Name: = ShippingMonth
Sample



Was this article helpful?

What's Next