Page tree


Contents:

   

Contents:


Returns the serial date number for the last day of the month before or after a specified number of months from a starting date.

Wrangle vs. SQL: This function is part of Wrangle, a proprietary data transformation language. Wrangle is not SQL. For more information, see Wrangle Language.

Basic Usage

eomonth(myDate, 3)

Output: Returns the values for the last date of the month that is three months after the serial date number value in the myDate column. 

Syntax and Arguments

eomonth(start_date,delta_months)


ArgumentRequired?Data TypeDescription
start_dateYDatetimeStarting date.
delta_monthsYintegerNumber of months before or after the starting date to apply to the date value.

For more information on syntax standards, see Language Documentation Syntax Notes.

start_date

Starting date values from which to compute end-of-month values.

Usage Notes:

 

Required?Data TypeExample Value
YesLiteral Datetime or column referenceLastContactDate

delta_months

Number of months to add to the date value to determine the month whose last date is returned.

  • Negative integer values are accepted.

Usage Notes:

Required?Data TypeExample Value
YesInteger-3


Examples


Tip: For additional examples, see Common Tasks.

Example - EOMONTH Function

Source:

In the following table, you can see how the the end-of-month values are calculated from a baseline date of June 15, 2020.

eventIdeventDatedeltaMonth
106/15/2020-24
206/15/2020-18
306/15/2020-12
406/15/2020-6
506/15/2020-3
606/15/2020-2
706/15/2020-1
806/15/20200
906/15/20201
1006/15/20202
1106/15/20203
1206/15/20206
1306/15/202012
1406/15/202018
1506/15/202024

Transformation:

Transformation Name New formula
Parameter: Formula type Single row formula
Parameter: Formula eomonth(eventDate,deltaMonth)
Parameter: New column name 'deltaMonthSerialDate'

Results:

eventIdeventDatedeltaMonth

deltaMonthSerialDate

106/15/2020-2443281
206/15/2020-1843465
306/15/2020-1243646
406/15/2020-643830
506/15/2020-343921
606/15/2020-243951
706/15/2020-143982
806/15/2020044012
906/15/2020144043
1006/15/2020244074
1106/15/2020344104
1206/15/2020644196
1306/15/20201244377
1406/15/20201844561
1506/15/20202444742


This page has no comments.