snowflake.snowpark.functions.date_from_parts¶
- snowflake.snowpark.functions.date_from_parts(y: ColumnOrName | int, m: ColumnOrName | int, d: ColumnOrName | 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))]