snowflake.snowpark.functions.date_from_parts¶

snowflake.snowpark.functions.date_from_parts(y: Union[Column, str, int], m: Union[Column, str, int], d: Union[Column, str, int]) → Column[source]¶

Creates a date from individual numeric components that represent the year, month, and day of the month.

Example::
>>> df = session.create_dataframe([[2022, 4, 1]], schema=["year", "month", "day"])
>>> df.select(date_from_parts("year", "month", "day")).collect()
[Row(DATE_FROM_PARTS("YEAR", "MONTH", "DAY")=datetime.date(2022, 4, 1))]
>>> session.table("dual").select(date_from_parts(2022, 4, 1)).collect()
[Row(DATE_FROM_PARTS(2022, 4, 1)=datetime.date(2022, 4, 1))]
Copy