DATE_ADD - Amazon Glue DataBrew
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

DATE_ADD

Adds a year, month, or day to the date from a source column or value, and creates a new column containing the results.

Parameters
  • sourceColumn – The name of an existing column.

  • value – A character string to evaluate.

  • units – A unit of measure for adjusting the date. Valid values are MONTHS, YEARS, MILLISECONDS, QUARTERS, HOURS, MICROSECONDS, WEEKS, SECONDS, DAYS, and MINUTES.

  • dateAddValue – The number of units to be added to the date.

  • dateTimeFormat – Optional. A format string for the date, as it is to appear in the new column. If not specified, the default format is yyyy-mm-dd HH:MM:SS.

  • targetColumn – A name for the newly created column.

Note

You can specify either sourceColumn or value, but not both.

Example

{ "RecipeAction": { "Operation": "DATE_ADD", "Parameters": { "sourceColumn": "DATE Column 1", "units": "DAYS", "dateAddValue": "14", "dateTimeFormat": "mm/dd/yyyy", "targetColumn": "DATE Column 1_DATEADD" } } }