Skip to content

Commit

Permalink
Fixed tags
Browse files Browse the repository at this point in the history
  • Loading branch information
sfc-gh-sjayabalan committed Sep 18, 2024
1 parent 74cb157 commit a85eeb7
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions src/main/java/com/snowflake/snowpark_java/Functions.java
Original file line number Diff line number Diff line change
Expand Up @@ -4836,10 +4836,18 @@ public static Column try_cast(Column e, DataType targetType) {
* date using try_cast and if it's not possible to cast, returns null. If receiving a timestamp it
* will be casted to date (removing its time). Example::
*
* <p>>>> from snowflake.snowpark.functions import date_sub, to_date >>> df =
* session.createDataFrame([("1976-01-06")], ["date"]) >>> df = df.withColumn("date",
* to_date("date")) >>> df.withColumn("date", date_sub("date", 2)).show() -------------- |"DATE" |
* -------------- |1976-01-04 | -------------- """
* <pre>{@code
* from snowflake.snowpark.functions import date_sub, to_date
* df = session.createDataFrame([("1976-01-06")], ["date"])
* df = df.withColumn("date",to_date("date"))
* df.withColumn("date", date_sub("date", 2)).show()
* --------------
* |"DATE" |
* --------------
* |1976-01-04 |
* -------------- """
*
* }</pre>
*
* @since 1.15.0
* @param start Date, Timestamp or String column to subtract days from.
Expand Down

0 comments on commit a85eeb7

Please sign in to comment.