Page tree


Contents:

Our documentation site is moving!

For up-to-date documentation of Designer Cloud on AWS, please visit us at https://help.alteryx.com/AWS/.

   

Generates a serial date number from a valid date value.
  • Serial date number values begin with January 1, 1900.
  • Source values can be a valid date or output of a function that generates a valid 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

Integer literal values:

serialnumber(date(2015,02,15))

Output: Returns the serial date number for February 15, 2015.

Column reference values:

serialnumber(date(myYear, myMonth, myDay))

Output: Returns serial date number based on three input columns, which contain valid values for day, month, and year in the calendar.

Syntax and Arguments

serialnumber(date_col)


ArgumentRequired?Data TypeDescription
date_colYDatetimeDate literal, name of column containing valid date values, or function returning a valid date value.

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

date_col

Date literal, column containing date values, or function returning date values. Time values in the input value are not used.

  • Missing values for this function in the source data result in missing values in the output.
  • Multiple columns and wildcards are not supported.

Usage Notes:

 

Required?Data TypeExample Value
YesDatetime (literal,column reference, or function)DATE(2020,01,02)


Examples


Tip: For additional examples, see Common Tasks.

Example - serial date numbers

Source:

eventIdYearMonthDay
e00120210101
e00220210102
e00320210103
e00420210104
e00520210105

Transformation:

Transformation Name New formula
Parameter: Formula type Single row formula
Parameter: Formula serialnumber(date(Year, Month, Day))
Parameter: New column name 'datSerialNumber'

Results:

eventIdYearMonthDaydatSerialNumber
e0012021010144197
e0022021010244198
e0032021010344199
e0042021010444200
e0052021010544201


This page has no comments.