MONTH

MONTH takes a date and returns an integer representing the month of the year on which it falls.

Function category: Date

Syntax

MONTH(arg1)

Arguments

Descriptions

arg1

Date object or a function that resolves to a date object.

Examples

Example 1: Find the month based on the function NOW()

Let's say we received a response with the following insurance claim information:

{
"data":{
"claim": {
"issue_number": "2a515",
"date": "NOW()"
}
}
}

If we wanted to find the month of the year for the date field, which is set to the value of NOW, we could use MONTH:

MONTH(data.claim.date)

This would return an integer with the month at the time of calling.

The structure of the returned date response follows the ISO 8601 standard.