Skip to content

Commit

Permalink
fix: fix typo and update function docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Cheng-Yuan-Lai committed Dec 29, 2024
1 parent 05df04b commit b136ab8
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion datafusion/functions/src/datetime/make_date.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ use datafusion_macros::user_doc;
#[user_doc(
doc_section(label = "Time and Date Functions"),
description = "Make a date from year/month/day component parts.",
syntax_example = "from_unixtime(expression[, timezone])",
syntax_example = "make_date(year, month, day)",
sql_example = r#"```sql
> select make_date(2023, 1, 31);
+-------------------------------------------+
Expand Down
22 changes: 11 additions & 11 deletions docs/source/user-guide/sql/scalar_functions.md
Original file line number Diff line number Diff line change
Expand Up @@ -2135,7 +2135,7 @@ from_unixtime(expression[, timezone])
Make a date from year/month/day component parts.

```
make_date(year, month, day)
from_unixtime(expression[, timezone])
```

#### Arguments
Expand Down Expand Up @@ -2233,17 +2233,17 @@ to_date('2017-05-31', '%Y-%m-%d')

```sql
> select to_date('2023-01-31');
+-----------------------------+
| to_date(Utf8("2023-01-31")) |
+-----------------------------+
| 2023-01-31 |
+-----------------------------+
+-------------------------------+
| to_date(Utf8(\"2023-01-31\")) |
+-------------------------------+
| 2023-01-31 |
+-------------------------------+
> select to_date('2023/01/31', '%Y-%m-%d', '%Y/%m/%d');
+---------------------------------------------------------------+
| to_date(Utf8("2023/01/31"),Utf8("%Y-%m-%d"),Utf8("%Y/%m/%d")) |
+---------------------------------------------------------------+
| 2023-01-31 |
+---------------------------------------------------------------+
+---------------------------------------------------------------------+
| to_date(Utf8(\"2023/01/31\"),Utf8(\"%Y-%m-%d\"),Utf8(\"%Y/%m/%d\")) |
+---------------------------------------------------------------------+
| 2023-01-31 |
+---------------------------------------------------------------------+
```

Additional examples can be found [here](https://github.com/apache/datafusion/blob/main/datafusion-examples/examples/to_date.rs)
Expand Down

0 comments on commit b136ab8

Please sign in to comment.