pyspark.sql.functions.make_date(year: ColumnOrName, month: ColumnOrName, day: ColumnOrName) → pyspark.sql.column.Column[source]

Returns a column with a date built from the year, month and day columns.

New in version 3.3.0.

yearColumn or str

The year to build the date

monthColumn or str

The month to build the date

dayColumn or str

The day to build the date


>>> df = spark.createDataFrame([(2020, 6, 26)], ['Y', 'M', 'D'])
>>>, df.M, df.D).alias("datefield")).collect()
[Row(, 6, 26))]