Skip to content

Commit 75d7ca6

Browse files
authored
Merge pull request #7537 from TCeason/modify_docs
docs: modify todatetime doc
2 parents 45fe702 + 48de45e commit 75d7ca6

File tree

1 file changed

+7
-0
lines changed
  • docs/doc/30-reference/20-functions/30-datetime-functions

1 file changed

+7
-0
lines changed

docs/doc/30-reference/20-functions/30-datetime-functions/todatetime.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ The function extracts a date and time from the provided string. If the argument
2222

2323
Returns a value of Timestamp type in the format “YYYY-MM-DD hh:mm:ss.ffffff”.
2424

25+
If the expr matches this format but does not have a time part, it is automatically extended to this pattern. The padding value is 0.
26+
2527
## Examples
2628

2729
### Using a String as Argument
@@ -46,6 +48,11 @@ SELECT TO_DATETIME('2022-01-02T01:12:00-07:00');
4648

4749
---
4850
2022-01-02 08:12:00.000000
51+
52+
SELECT TO_DATETIME('2022-01-02T01');
53+
54+
---
55+
2022-01-02 01:00:00.000000
4956
```
5057

5158
### Using an Integer as Argument

0 commit comments

Comments
 (0)