Skip to content
Daniel Gorman edited this page May 22, 2019 · 1 revision

The DATE Function

Function Group: Date

DATE takes a year, month, and day as integers and returns a date.

Syntax

DATE(arg1, arg2, arg3)

  • arg1 is an integer representing the year
  • arg2 is an integer representing the month
  • arg3 is an integer representing the day

Uses

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

{  
   "data":{  
      "claim": {
        "issue_number": "2a515",
        "year": 2019,
        "month": 12,
        "day": 15
      }
   }
}

If we wanted to aggregate the date information into a single value, we could use DATE:

DATE(data.claim.year, data.claim.month, data.claim.day)

Which would return: 2019-12-15T00:00:00.000Z

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

Clone this wiki locally