Generates a serial date number from a valid date value.

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.

serialnumber(date_col)


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

date_col

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

 

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


Example - serial date numbers

Source:

eventIdYearMonthDay
e00120210101
e00220210102
e00320210103
e00420210104
e00520210105

Transformation:

Results:

eventIdYearMonthDaydatSerialNumber
e0012021010144197
e0022021010244198
e0032021010344199
e0042021010444200
e0052021010544201