Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Published by Scroll Versions from space DEV and version next

...

Info

NOTE: If this function computes values out of the supported range of dates, the values are written as mismatched values, and the column is likely to be typed as a Datetime column. For more information on supported date ranges, see Datetime Data Type.


D s
snippetBasic

DATEADD
d-codelang-syntax
RawWrangletrue
Typeref
showNotetrue
WrangleTextderive type:single value:
dateadd(myDate, 3, month)

dateadd(myDate, 3, month)

Output:

...

 Returns the values in the myDate column with three months added to them. 

Info

NOTE: Output dates are always formatted with dashes. For example, if the input values include 12/31/2016, a DATEADD dateadd function output might be 03-31-2016.

 

D s
snippetSyntax

DATEADD
d-codelang-syntax
RawWrangletrue
Typesyntax
showNotetrue
WrangleTextderive type:single value:
dateadd(date,delta,date_units)

dateadd(date,delta,date_units)


ArgumentRequired?Data TypeDescription
dateYdatetimeStarting date to compare
deltaYintegerNumber of units to apply to the date value.
date_unitsYstringString literal representing the date units to use in the comparison

...

InvNumInvDate
inv00011/1/2016
inv00027/15/2016
inv000312/30/2016

TransformTransformation:

d-

...

trans
RawWrangletrue
p03Value'plus90'
Typestep
WrangleTextderive type:single value:

...

dateadd(InvDate,90,day) as:'plus90'

...

p01NameFormula type
p01ValueSingle row formula
p02NameFormula
p02Valuedateadd(InvDate,90,day)
p03NameNew column name
SearchTermNew formula

D trans
RawWrangletrue
p03Value'plus180'
Typestep
WrangleTextderive type:single value:

...

dateadd(InvDate,180,day) as:'plus180'
p01NameFormula type
p01ValueSingle row formula
p02NameFormula
p02Valuedateadd(InvDate,180,day)
p03NameNew column name
SearchTermNew formula

Results:

Info

NOTE: The output format is always formatted with dashes.

...