This is an automated email from the ASF dual-hosted git repository.

zclll pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris-website.git


The following commit(s) were added to refs/heads/master by this push:
     new 7b1f1fece63 [fix](documention) Add some cases to date documention 
(#2965)
7b1f1fece63 is described below

commit 7b1f1fece638055b03bac4503e27e714ddc045f6
Author: dwdwqfwe <[email protected]>
AuthorDate: Tue Oct 14 17:14:39 2025 +0800

    [fix](documention) Add some cases to date documention (#2965)
    
    ## Versions
    
    - [x] dev
    - [ ] 3.0
    - [ ] 2.1
    - [ ] 2.0
    
    ## Languages
    
    - [x] Chinese
    - [x] English
    
    ## Docs Checklist
    
    - [ ] Checked by AI
    - [ ] Test Cases Built
---
 .../date-time-functions/day-ceil.md                |   9 +-
 .../date-time-functions/day-floor.md               |   8 ++
 .../date-time-functions/hour-ceil.md               |   8 ++
 .../date-time-functions/hour-floor.md              |   8 ++
 .../date-time-functions/minute-ceil.md             |   8 ++
 .../date-time-functions/minute-floor.md            |   8 ++
 .../date-time-functions/month-ceil.md              |   8 ++
 .../date-time-functions/month-floor.md             |   8 ++
 .../date-time-functions/quarter-ceil.md            | 140 ++++++++++++------
 .../date-time-functions/quarter-floor.md           | 156 +++++++++++++++++----
 .../date-time-functions/second-ceil.md             |   8 ++
 .../date-time-functions/second-floor.md            |   8 ++
 .../date-time-functions/week-ceil.md               |   8 ++
 .../date-time-functions/week-floor.md              |   8 ++
 .../date-time-functions/year-ceil.md               |   8 ++
 .../date-time-functions/year-floor.md              |   8 ++
 .../date-time-functions/day-ceil.md                |   8 ++
 .../date-time-functions/day-floor.md               |   8 ++
 .../date-time-functions/hour-ceil.md               |   8 ++
 .../date-time-functions/hour-floor.md              |   8 ++
 .../date-time-functions/minute-ceil.md             |   8 ++
 .../date-time-functions/minute-floor.md            |   8 ++
 .../date-time-functions/month-ceil.md              |   8 ++
 .../date-time-functions/month-floor.md             |   8 ++
 .../date-time-functions/quarter-ceil.md            | 135 ++++++++++++------
 .../date-time-functions/quarter-floor.md           | 133 ++++++++++++------
 .../date-time-functions/second-ceil.md             |   8 ++
 .../date-time-functions/second-floor.md            |   8 ++
 .../date-time-functions/week-ceil.md               |   8 ++
 .../date-time-functions/week-floor.md              |   8 ++
 .../date-time-functions/year-ceil.md               |   8 ++
 .../date-time-functions/year-floor.md              |   8 ++
 32 files changed, 638 insertions(+), 151 deletions(-)

diff --git 
a/docs/sql-manual/sql-functions/scalar-functions/date-time-functions/day-ceil.md
 
b/docs/sql-manual/sql-functions/scalar-functions/date-time-functions/day-ceil.md
index a4ce189794d..cf248bddd68 100644
--- 
a/docs/sql-manual/sql-functions/scalar-functions/date-time-functions/day-ceil.md
+++ 
b/docs/sql-manual/sql-functions/scalar-functions/date-time-functions/day-ceil.md
@@ -83,6 +83,14 @@ select day_ceil("2023-07-13 22:28:18");
 | 2023-07-14 00:00:00             |
 +---------------------------------+
 
+-- Only with origin date and specified date
+select day_ceil("2023-07-13 22:28:18", "2021-07-01 12:22:34");
++--------------------------------------------------------+
+| day_ceil("2023-07-13 22:28:18", "2021-07-01 12:22:34") |
++--------------------------------------------------------+
+| 2023-07-14 12:22:34                                    |
++--------------------------------------------------------+
+
 -- Specify period as 7 days (1 week), custom reference time as 2023-01-01 
00:00:00
 select day_ceil("2023-07-13 22:28:18", 7, "2023-01-01 00:00:00");
 +-----------------------------------------------------------+
@@ -101,7 +109,6 @@ select day_ceil("2023-07-16 00:00:00", 7, "2023-01-01 
00:00:00");
 
 -- Input is DATE type, period is 3 days
 select day_ceil(cast("2023-07-13" as date), 3);
-
 +-----------------------------------------+
 | day_ceil(cast("2023-07-13" as date), 3) |
 +-----------------------------------------+
diff --git 
a/docs/sql-manual/sql-functions/scalar-functions/date-time-functions/day-floor.md
 
b/docs/sql-manual/sql-functions/scalar-functions/date-time-functions/day-floor.md
index 966a3de2202..78f5c103579 100644
--- 
a/docs/sql-manual/sql-functions/scalar-functions/date-time-functions/day-floor.md
+++ 
b/docs/sql-manual/sql-functions/scalar-functions/date-time-functions/day-floor.md
@@ -79,6 +79,14 @@ select day_floor("2023-07-13 22:28:18");
 | 2023-07-13 00:00:00              |
 +----------------------------------+
 
+-- Only with origin date and specified date
+select day_floor("2023-07-13 22:28:18", "2023-01-01 12:00:00");
++---------------------------------------------------------+
+| day_floor("2023-07-13 22:28:18", "2023-01-01 12:00:00") |
++---------------------------------------------------------+
+| 2023-07-13 12:00:00                                     |
++---------------------------------------------------------+
+
 -- Specify period as 7 days (1 week), custom reference time as 2023-01-01 
00:00:00
 select day_floor("2023-07-13 22:28:18", 7, "2023-01-01 00:00:00");
 +------------------------------------------------------------+
diff --git 
a/docs/sql-manual/sql-functions/scalar-functions/date-time-functions/hour-ceil.md
 
b/docs/sql-manual/sql-functions/scalar-functions/date-time-functions/hour-ceil.md
index dde71347acb..eea69895835 100644
--- 
a/docs/sql-manual/sql-functions/scalar-functions/date-time-functions/hour-ceil.md
+++ 
b/docs/sql-manual/sql-functions/scalar-functions/date-time-functions/hour-ceil.md
@@ -84,6 +84,14 @@ select hour_ceil('2023-07-13 01:00:00');
 | 2023-07-13 01:00:00              |
 +----------------------------------+
 
+--  Only with origin date and specified date
+select hour_ceil("2023-07-13 22:28:18", "2023-07-01 12:12:00");
++---------------------------------------------------------+
+| hour_ceil("2023-07-13 22:28:18", "2023-07-01 12:12:00") |
++---------------------------------------------------------+
+| 2023-07-13 23:12:00                                     |
++---------------------------------------------------------+
+
 -- If origin or datetime has scale, the returned result has scale
 mysql> select hour_ceil('2023-07-13 19:30:00', 4, '2023-07-13 08:00:00.123') ;
 +----------------------------------------------------------------+
diff --git 
a/docs/sql-manual/sql-functions/scalar-functions/date-time-functions/hour-floor.md
 
b/docs/sql-manual/sql-functions/scalar-functions/date-time-functions/hour-floor.md
index 32260317373..80f7c81e724 100644
--- 
a/docs/sql-manual/sql-functions/scalar-functions/date-time-functions/hour-floor.md
+++ 
b/docs/sql-manual/sql-functions/scalar-functions/date-time-functions/hour-floor.md
@@ -73,6 +73,14 @@ select hour_floor("2023-07-13 18:00:00", 5);
 | 2023-07-13 18:00:00                  |
 +--------------------------------------+
 
+-- Only with origin date and specified date
+select hour_floor("2023-07-13 22:28:18", "2023-07-01 12:12:00");
++----------------------------------------------------------+
+| hour_floor("2023-07-13 22:28:18", "2023-07-01 12:12:00") |
++----------------------------------------------------------+
+| 2023-07-13 22:12:00                                      |
++----------------------------------------------------------+
+
 -- Input date type will be converted to start time 2023-07-13 00:00:00 of the 
day
 mysql> select hour_floor('2023-07-13 20:30:00', 4, '2023-07-13');
 +----------------------------------------------------+
diff --git 
a/docs/sql-manual/sql-functions/scalar-functions/date-time-functions/minute-ceil.md
 
b/docs/sql-manual/sql-functions/scalar-functions/date-time-functions/minute-ceil.md
index a960388f976..3a7802e9380 100644
--- 
a/docs/sql-manual/sql-functions/scalar-functions/date-time-functions/minute-ceil.md
+++ 
b/docs/sql-manual/sql-functions/scalar-functions/date-time-functions/minute-ceil.md
@@ -77,6 +77,14 @@ SELECT MINUTE_CEIL('2023-07-13 22:30:00', 5) AS result;
 | 2023-07-13 22:30:00.000000 |
 +----------------------------+
 
+-- Only with origin date and specified date
+select minute_ceil("2023-07-13 22:28:18", "2023-07-01 12:21:23");
++-----------------------------------------------------------+
+| minute_ceil("2023-07-13 22:28:18", "2023-07-01 12:21:23") |
++-----------------------------------------------------------+
+| 2023-07-13 22:28:23                                       |
++-----------------------------------------------------------+
+
 -- Specifying origin time
 SELECT MINUTE_CEIL('2023-07-13 22:28:18', 5, '2023-07-13 22:20:00') AS result;
 +----------------------------+
diff --git 
a/docs/sql-manual/sql-functions/scalar-functions/date-time-functions/minute-floor.md
 
b/docs/sql-manual/sql-functions/scalar-functions/date-time-functions/minute-floor.md
index 40189d0b40d..fe249998b33 100644
--- 
a/docs/sql-manual/sql-functions/scalar-functions/date-time-functions/minute-floor.md
+++ 
b/docs/sql-manual/sql-functions/scalar-functions/date-time-functions/minute-floor.md
@@ -75,6 +75,14 @@ SELECT MINUTE_FLOOR('2023-07-13 22:25:00', 5) AS result;
 | 2023-07-13 22:25:00.000000 |
 +----------------------------+
 
+-- Only with origin date and specified date
+select minute_floor("2023-07-13 22:28:18", "2023-07-01 12:21:23");
++------------------------------------------------------------+
+| minute_floor("2023-07-13 22:28:18", "2023-07-01 12:21:23") |
++------------------------------------------------------------+
+| 2023-07-13 22:27:23                                        |
++------------------------------------------------------------+
+
 -- Specifying origin time
 SELECT MINUTE_FLOOR('2023-07-13 22:28:18', 5, '2023-07-13 22:20:00') AS result;
 +---------------------+
diff --git 
a/docs/sql-manual/sql-functions/scalar-functions/date-time-functions/month-ceil.md
 
b/docs/sql-manual/sql-functions/scalar-functions/date-time-functions/month-ceil.md
index 7589d7c5672..9f2f6f59b17 100644
--- 
a/docs/sql-manual/sql-functions/scalar-functions/date-time-functions/month-ceil.md
+++ 
b/docs/sql-manual/sql-functions/scalar-functions/date-time-functions/month-ceil.md
@@ -77,6 +77,14 @@ SELECT MONTH_CEIL('2023-12-01 00:00:00', 5) AS result;
 | 2023-12-01 00:00:00        |
 +----------------------------+
 
+-- Only with origin date and specified date
+select month_ceil("2023-07-13 22:28:18", "2022-07-04 00:00:00");
++----------------------------------------------------------+
+| month_ceil("2023-07-13 22:28:18", "2022-07-04 00:00:00") |
++----------------------------------------------------------+
+| 2023-08-04 00:00:00                                      |
++----------------------------------------------------------+
+
 -- Specifying origin time
 SELECT MONTH_CEIL('2023-07-13 22:28:18', 5, '2023-01-01 00:00:00') AS result;
 +---------------------+
diff --git 
a/docs/sql-manual/sql-functions/scalar-functions/date-time-functions/month-floor.md
 
b/docs/sql-manual/sql-functions/scalar-functions/date-time-functions/month-floor.md
index 4c7e76d9005..ffac77a535f 100644
--- 
a/docs/sql-manual/sql-functions/scalar-functions/date-time-functions/month-floor.md
+++ 
b/docs/sql-manual/sql-functions/scalar-functions/date-time-functions/month-floor.md
@@ -75,6 +75,14 @@ SELECT MONTH_FLOOR('2023-06-01 00:00:00', 5) AS result;
 | 2023-06-01 00:00:00 |
 +---------------------+
 
+-- Only with origin date and specified date
+ select month_floor("2023-07-13 22:28:18", "2023-01-04 00:00:00");
++-----------------------------------------------------------+
+| month_floor("2023-07-13 22:28:18", "2023-01-04 00:00:00") |
++-----------------------------------------------------------+
+| 2023-07-04 00:00:00                                       |
++-----------------------------------------------------------+
+
 -- Specifying origin time
 SELECT MONTH_FLOOR('2023-07-13 22:28:18', 5, '2023-01-01 00:00:00') AS result;
 +---------------------+
diff --git 
a/docs/sql-manual/sql-functions/scalar-functions/date-time-functions/quarter-ceil.md
 
b/docs/sql-manual/sql-functions/scalar-functions/date-time-functions/quarter-ceil.md
index e87a59d8efe..aa87803b4ad 100644
--- 
a/docs/sql-manual/sql-functions/scalar-functions/date-time-functions/quarter-ceil.md
+++ 
b/docs/sql-manual/sql-functions/scalar-functions/date-time-functions/quarter-ceil.md
@@ -7,8 +7,7 @@
 
 ## Description
 
-
-The quarter_ceil function rounds a datetime value up to the nearest specified 
quarter period boundary. If origin is specified, the period is calculated based 
on that time.
+The QUARTER_CEIL function rounds up the input datetime value to the nearest 
specified quarter period. If an origin time is specified, it uses that time as 
the baseline for period calculation; if not specified, it defaults to 
0001-01-01 00:00:00. This function supports processing DATETIME and DATE types.
 
 Date calculation formula:
 $$
@@ -18,63 +17,120 @@ $$
 &k \in \mathbb{Z} \land \langle\text{origin}\rangle + k \times 
\langle\text{period}\rangle \times \text{quarter} \geq 
\langle\text{date\_or\_time\_expr}\rangle\}
 \end{aligned}
 $$
-$k$ represents the number of periods needed from the baseline time to reach 
the target time.
+$k$ represents the number of periods needed from the baseline time to reach 
the target time
 
 ## Syntax
 
 ```sql
-QUARTER_CEIL(<datetime>)
-QUARTER_CEIL(<datetime>, <origin>)
-QUARTER_CEIL(<datetime>, <period>)
-QUARTER_CEIL(<datetime>, <period>, <origin>)
+QUARTER_CEIL(`<date_or_time_expr>`)
+QUARTER_CEIL(`<date_or_time_expr>`, `<origin>`)
+QUARTER_CEIL(`<date_or_time_expr>`, `<period>`)
+QUARTER_CEIL(`<date_or_time_expr>`, `<period>`, `<origin>`)
 ```
 
 ## Parameters
 
 | Parameter | Description |
 | ---- | ---- |
-| `<datetime>` | The datetime value to round up, type is DATE or DATETIME |
-| `<period>` | Quarter period value, type is INT, representing the number of 
quarters contained in each period |
-| `<origin>` | The starting point of the period, type is DATE or DATETIME, 
default value is 0001-01-01 00:00:00 |
-
-Notes:
-- When period is not specified, it is equivalent to using 1 quarter as the 
period
-- When period is not a positive integer, the function result will be NULL
-- The result always rounds to the future time
-- The time part of the return value is always 00:00:00
+| `<date_or_time_expr>` | The datetime value to be rounded up. It is a valid 
date expression that supports date/datetime types. For specific datetime and 
date formats, see [datetime 
conversion](../../../../../docs/sql-manual/basic-element/sql-data-types/conversion/datetime-conversion)
 and [date 
conversion](../../../../../docs/sql-manual/basic-element/sql-data-types/conversion/date-conversion).
 |
+| `<period>` | Quarter period value, type INT, indicating the number of 
quarters contained in each period |
+| `<origin_datetime>` | The starting time point of the period, supports 
date/datetime types, default value is 0001-01-01 00:00:00 |
 
 ## Return Value
 
-When `<datetime>` is of DATE type, the return type is DATE.
-When `<datetime>` is of DATETIME type, the return type is DATETIME.
-Represents the rounded up datetime value. The time part of the result will be 
set to 00:00:00.
+Returns DATETIME type, returning the time value rounded up to the nearest 
specified quarter period based on the input datetime. The precision of the 
return value matches the precision of the input datetime parameter.
 
-## Examples
-
-Starting from '0001-01-01 00:00:00', with periods of 5 / 4 quarters each, 
return the next period start point closest to the input date.
-```sql
-SELECT QUARTER_CEIL("2023-07-13 22:28:18", 5), QUARTER_CEIL("2023-07-13 
22:28:18", 4);
-```
+- If `<period>` is non-positive, returns an error.
+- If any parameter is NULL, returns NULL.
+- When period is not specified, defaults to 1 quarter period.
+- When `<origin>` is not specified, defaults to 0001-01-01 00:00:00 as 
baseline.
+- When input is DATE type (default time is set to 00:00:00).
+- If the calculation result exceeds the maximum date range 9999-12-31 
23:59:59, returns an error
+- If `<origin>` datetime is after `<period>`, the calculation follows the same 
formula, but period k is negative.
+- If `date_or_time_expr` has scale, the returned result also has scale with 
fractional part as zero.
 
-```text
-+----------------------------------------+----------------------------------------+
-| QUARTER_CEIL("2023-07-13 22:28:18", 5) | QUARTER_CEIL("2023-07-13 22:28:18", 
4) |
-+----------------------------------------+----------------------------------------+
-| 2024-10-01 00:00:00.000000             | 2024-01-01 00:00:00.000000          
   |
-+----------------------------------------+----------------------------------------+
-```
+## Examples
 
-Using '2022-01-01 00:00:00' as the period start point, with periods of 2 / 4 
quarters each, return the next period start point closest to the input date.
 ```sql
-SELECT QUARTER_CEIL("2023-03-13 22:28:18", 2, "2022-01-01 00:00:00"), 
QUARTER_CEIL("2023-07-13 22:28:18", 4, "2022-01-01 00:00:00");
-```
-
-```text
-+---------------------------------------------------------------+---------------------------------------------------------------+
-| QUARTER_CEIL("2023-03-13 22:28:18", 2, "2022-01-01 00:00:00") | 
QUARTER_CEIL("2023-07-13 22:28:18", 4, "2022-01-01 00:00:00") |
-+---------------------------------------------------------------+---------------------------------------------------------------+
-| 2023-07-01 00:00:00                                           | 2024-01-01 
00:00:00                                           |
-+---------------------------------------------------------------+---------------------------------------------------------------+
+-- Default period of 1 quarter, default origin time 0001-01-01 00:00:00
+SELECT QUARTER_CEIL('2023-07-13 22:28:18') AS result;
++---------------------+
+| result              |
++---------------------+
+| 2023-10-01 00:00:00 |
++---------------------+
+
+-- Period of 5 quarters, rounding up result with default origin point
+SELECT QUARTER_CEIL('2023-07-13 22:28:18', 5) AS result;
++---------------------+
+| result              |
++---------------------+
+| 2024-10-01 00:00:00 |
++---------------------+
+
+-- With only origin date and specified date
+select QUARTER_CEIL("2023-07-13 22:28:18", "2022-07-01 00:00:00");
++-------------------------------------------------------------+
+| QUARTER_CEIL("2023-07-13 22:28:18", "2022-07-01 00:00:00") |
++-------------------------------------------------------------+
+| 2023-10-01 00:00:00                                         |
++-------------------------------------------------------------+
+
+-- Input datetime exactly at period start point, returns the input datetime
+SELECT QUARTER_CEIL('2023-10-01 00:00:00', 1) AS result;
++----------------------------+
+| result                     |
++----------------------------+
+| 2023-10-01 00:00:00        |
++----------------------------+
+
+-- Specified origin time
+SELECT QUARTER_CEIL('2023-07-13 22:28:18', 2, '2023-01-01 00:00:00') AS result;
++---------------------+
+| result              |
++---------------------+
+| 2024-01-01 00:00:00 |
++---------------------+
+
+--- Datetime with scale, time part and fractional digits are truncated to 0
+SELECT QUARTER_CEIL('2023-07-13 22:28:18.456789', 1) AS result;
++----------------------------+
+| result                     |
++----------------------------+
+| 2023-10-01 00:00:00.000000 |
++----------------------------+
+
+--- If <origin> datetime is after <period>, calculation follows the same 
formula with negative period k
+SELECT QUARTER_CEIL('2022-09-13 22:28:18', 4, '2028-07-01 00:00:00') AS result;
++---------------------+
+| result              |
++---------------------+
+| 2024-07-01 00:00:00 |
++---------------------+
+
+--- Input as DATE type (default time 00:00:00)
+SELECT QUARTER_CEIL('2023-07-13', 1) AS result;
++---------------------+
+| result              |
++---------------------+
+| 2023-10-01 00:00:00 |
++---------------------+
+
+-- Calculation result exceeds maximum date range 9999-12-31, returns error
+SELECT QUARTER_CEIL('9999-10-13 22:28:18', 2) AS result;
+ERROR 1105 (HY000): errCode = 2, detailMessage = (10.16.10.3)[E-218]Operation 
quarter_ceil of 9999-10-13 22:28:18, 2 out of range
+
+--- Non-positive period, returns error
+SELECT QUARTER_CEIL('2023-07-13 22:28:18', -1) AS result;
+ERROR 1105 (HY000): errCode = 2, detailMessage = (10.16.10.3)[E-218]Operation 
quarter_ceil of 2023-07-13 22:28:18, -1 out of range
+
+--- Any parameter is NULL, returns NULL
+SELECT QUARTER_CEIL(NULL, 1), QUARTER_CEIL('2023-07-13 22:28:18', NULL) AS 
result;
++-----------------------+--------+
+| quarter_ceil(NULL, 1) | result |
++-----------------------+--------+
+| NULL                  | NULL   |
++-----------------------+--------+
 ```
 
 ## Best Practices
diff --git 
a/docs/sql-manual/sql-functions/scalar-functions/date-time-functions/quarter-floor.md
 
b/docs/sql-manual/sql-functions/scalar-functions/date-time-functions/quarter-floor.md
index 5cf37f66b67..6dc2d6eeff0 100644
--- 
a/docs/sql-manual/sql-functions/scalar-functions/date-time-functions/quarter-floor.md
+++ 
b/docs/sql-manual/sql-functions/scalar-functions/date-time-functions/quarter-floor.md
@@ -7,6 +7,50 @@
 
 ## Description
 
+QUARTER_FLOOR function rounds down the input datetime value to the nearest 
specified quarter period. If you specify origin time, the period will be 
divided based on this time and rounded down; if not specified, the default is 
0001-01-01 00:00:00. This function supports DATETIME and DATE types.
+
+Date and time calculation formula:
+
+$$
+\begin{aligned}
+&\text{quarter\_floor}(\langle\text{date\_or\_time\_expr}\rangle, 
\langle\text{period}\rangle, \langle\text{origin}\rangle) = \\
+&\max\{\langle\text{origin}\rangle + k \times \langle\text{period}\rangle 
\times \text{quarter} \mid \\
+&k \in \mathbb{Z} \land \langle\text{origin}\rangle + k \times 
\langle\text{period}\rangle \times \text{quarter} \leq 
\langle\text{date\_or\_time\_expr}\rangle\}
+\end{aligned}
+$$
+$k$ represents the number of periods from the base time to the target time
+
+## Syntax
+
+```sql
+QUARTER_FLOOR(`<date_or_time_expr>`)
+QUARTER_FLOOR(`<date_or_time_expr>`, `<origin>`)
+QUARTER_FLOOR(`<date_or_time_expr>`, `<period>`)
+QUARTER_FLOOR(`<date_or_time_expr>`, `<period>`, `<origin>`)
+```
+
+## Parameters
+
+| Parameter | Description |
+| ---- | ---- |
+| `<date_or_time_expr>` | The datetime value to be rounded down, type DATETIME 
or DATE. For specific datetime/date formats, see [datetime 
conversion](../../../../../current/sql-manual/basic-element/sql-data-types/conversion/datetime-conversion)
 and [date 
conversion](../../../../../current/sql-manual/basic-element/sql-data-types/conversion/date-conversion)
 |
+| `<period>` | Quarter period value, type INT, indicating the number of 
quarters contained in each period |
+| `<origin_datetime>` | Starting time point of the period, type DATETIME/DATE, 
default is 0001-01-01 00:00:00 |
+
+## Return Value
+
+Return type is DATETIME, returning the time value rounded down to the nearest 
specified quarter period based on the input datetime. The precision of the 
return value is the same as the precision of the input parameter datetime.
+
+- If `<period>` is non-positive (≤0), an error is returned.
+- If any parameter is NULL, return NULL.
+- When period is not specified, the default is 1 quarter as the period.
+- When `<origin>` is not specified, the default is based on 0001-01-01 
00:00:00.
+- If the input is DATE type (only containing year, month, day), its time part 
defaults to 00:00:00.
+- If the `<origin>` datetime is after `<period>`, it will also be calculated 
according to the above formula, but the period k is negative.
+- If `date_or_time_expr` has scale, the return result also has scale and the 
fractional part is zero.
+
+## Description
+
 The quarter_floor function rounds a datetime value down to the nearest 
specified quarter period boundary. If origin is specified, the period is 
calculated based on that time.
 
 Date calculation formula:
@@ -22,19 +66,19 @@ $k$ represents the number of periods needed from the 
baseline time to reach the
 ## Syntax
 
 ```sql
-QUARTER_FLOOR(<datetime>)
-QUARTER_FLOOR(<datetime>, <origin>)
-QUARTER_FLOOR(<datetime>, <period>)
-QUARTER_FLOOR(<datetime>, <period>, <origin>)
+QUARTER_CEIL(`<date_or_time_expr>`)
+QUARTER_CEIL(`<date_or_time_expr>`, `<origin>`)
+QUARTER_CEIL(`<date_or_time_expr>`, `<period>`)
+QUARTER_CEIL(`<date_or_time_expr>`, `<period>`, `<origin>`)
 ```
 
 ## Parameters
 
 | Parameter | Description |
 | ---- | ---- |
-| `<datetime>` | The datetime value to round down, type is DATE or DATETIME |
-| `<period>` | Quarter period value, type is INT, representing the number of 
quarters contained in each period |
-| `<origin>` | The starting point of the period, type is DATE or DATETIME, 
default value is 0001-01-01 00:00:00 |
+| `<date_or_time_expr>` | The datetime value to be rounded up. It is a valid 
date expression that supports date/datetime types. For specific datetime and 
date formats, see [datetime 
conversion](../../../../../docs/sql-manual/basic-element/sql-data-types/conversion/datetime-conversion)
 and [date 
conversion](../../../../../docs/sql-manual/basic-element/sql-data-types/conversion/date-conversion).
 |
+| `<period>` | Quarter period value, type INT, indicating the number of 
quarters contained in each period |
+| `<origin_datetime>` | The starting time point of the period, supports 
date/datetime types, default value is 0001-01-01 00:00:00 |
 
 Notes:
 - When period is not specified, it is equivalent to using 1 quarter as the 
period
@@ -50,30 +94,82 @@ The time part of the result will be set to 00:00:00.
 
 ## Examples
 
-Starting from '0001-01-01 00:00:00', with periods of 5 / 4 quarters each, 
return the period start point closest to the input date.
-```sql
-SELECT QUARTER_FLOOR("2023-07-13 22:28:18", 5), QUARTER_FLOOR("2023-07-13 
22:28:18", 4);
-```
-
-```text
-+-----------------------------------------+-----------------------------------------+
-| QUARTER_FLOOR("2023-07-13 22:28:18", 5) | QUARTER_FLOOR("2023-07-13 
22:28:18", 4) |
-+-----------------------------------------+-----------------------------------------+
-| 2021-01-01 00:00:00                     | 2022-01-01 00:00:00                
     |
-+-----------------------------------------+-----------------------------------------+
-```
-
-Using '2022-01-01 00:00:00' as the period start point, with periods of 2 / 4 
quarters each, return the period start point closest to the input date.
 ```sql
-SELECT QUARTER_FLOOR("2023-03-13 22:28:18", 2, "2022-01-01 00:00:00"), 
QUARTER_FLOOR("2023-07-13 22:28:18", 4, "2022-01-01 00:00:00");
-```
-
-```text
-+----------------------------------------------------------------+----------------------------------------------------------------+
-| QUARTER_FLOOR("2023-03-13 22:28:18", 2, "2022-01-01 00:00:00") | 
QUARTER_FLOOR("2023-07-13 22:28:18", 4, "2022-01-01 00:00:00") |
-+----------------------------------------------------------------+----------------------------------------------------------------+
-| 2023-01-01 00:00:00                                            | 2022-01-01 
00:00:00                                            |
-+----------------------------------------------------------------+----------------------------------------------------------------+
+-- Default period of 1 quarter, default start time 0001-01-01 00:00:00
+SELECT QUARTER_FLOOR('2023-07-13 22:28:18') AS result;
++---------------------+
+| result              |
++---------------------+
+| 2023-07-01 00:00:00 |
++---------------------+
+
+-- With 5 quarters as one period, rounding down result with default starting 
point
+SELECT QUARTER_FLOOR('2023-07-13 22:28:18', 5) AS result;
++---------------------+
+| result              |
++---------------------+
+| 2023-07-01 00:00:00 |
++---------------------+
+
+-- Input datetime is exactly the period starting point, return the input 
datetime
+SELECT QUARTER_FLOOR('2023-07-01 00:00:00', 1) AS result;
++---------------------+
+| result              |
++---------------------+
+| 2023-07-01 00:00:00 |
++---------------------+
+
+-- Only start date and specified date
+select QUARTER_FLOOR("2023-07-13 22:28:18", "2023-01-01 00:00:00");
++-------------------------------------------------------------+
+| QUARTER_FLOOR("2023-07-13 22:28:18", "2023-01-01 00:00:00") |
++-------------------------------------------------------------+
+| 2023-07-01 00:00:00                                         |
++-------------------------------------------------------------+
+
+-- Specify origin time
+SELECT QUARTER_FLOOR('2023-07-13 22:28:18', 2, '2023-01-01 00:00:00') AS 
result;
++---------------------+
+| result              |
++---------------------+
+| 2023-01-01 00:00:00 |
++---------------------+
+
+--- Datetime with scale, all decimal places will be truncated to 0
+SELECT QUARTER_FLOOR('2023-07-13 22:28:18.456789', 1) AS result;
++----------------------------+
+| result                     |
++----------------------------+
+| 2023-07-01 00:00:00.000000 |
++----------------------------+
+
+--- If <origin> datetime is after <period>, it will also be calculated 
according to the above formula, but period k is negative
+SELECT QUARTER_FLOOR('2022-09-13 22:28:18', 4, '2028-07-01 00:00:00') AS 
result;
++---------------------+
+| result              |
++---------------------+
+| 2020-07-01 00:00:00 |
++---------------------+
+
+--- Input is DATE type (default time 00:00:00)
+SELECT QUARTER_FLOOR('2023-07-13', 1) AS result;
++---------------------+
+| result              |
++---------------------+
+| 2023-07-01 00:00:00 |
++---------------------+
+
+--- Period is non-positive, returns error
+SELECT QUARTER_FLOOR('2023-07-13 22:28:18', -1) AS result;
+ERROR 1105 (HY000): errCode = 2, detailMessage = (10.16.10.3)[E-218]Operation 
quarter_floor of 2023-07-13 22:28:18, -1 out of range
+
+--- Any parameter is NULL, returns NULL
+SELECT QUARTER_FLOOR(NULL, 1), QUARTER_FLOOR('2023-07-13 22:28:18', NULL) AS 
result;
++------------------------+--------+
+| quarter_floor(NULL, 1) | result |
++------------------------+--------+
+| NULL                   | NULL   |
++------------------------+--------+
 ```
 
 ## Best Practices
diff --git 
a/docs/sql-manual/sql-functions/scalar-functions/date-time-functions/second-ceil.md
 
b/docs/sql-manual/sql-functions/scalar-functions/date-time-functions/second-ceil.md
index 589b985531c..bb11d5cd81a 100644
--- 
a/docs/sql-manual/sql-functions/scalar-functions/date-time-functions/second-ceil.md
+++ 
b/docs/sql-manual/sql-functions/scalar-functions/date-time-functions/second-ceil.md
@@ -66,6 +66,14 @@ SELECT SECOND_CEIL('2025-01-23 12:34:56', 5) AS result;
 | 2025-01-23 12:35:00 |
 +---------------------+
 
+-- Only with origin date and specified date
+select second_ceil("2023-07-13 22:28:18", "2023-07-13 22:13:12.123");
++---------------------------------------------------------------+
+| second_ceil("2023-07-13 22:28:18", "2023-07-13 22:13:12.123") |
++---------------------------------------------------------------+
+| 2023-07-13 22:28:18.123                                       |
++---------------------------------------------------------------+
+
 -- Specify starting time (origin)
 SELECT SECOND_CEIL('2025-01-23 12:34:56', 10, '2025-01-23 12:00:00') AS result;
 +---------------------+
diff --git 
a/docs/sql-manual/sql-functions/scalar-functions/date-time-functions/second-floor.md
 
b/docs/sql-manual/sql-functions/scalar-functions/date-time-functions/second-floor.md
index f804269d2e0..dbf2d703d8b 100644
--- 
a/docs/sql-manual/sql-functions/scalar-functions/date-time-functions/second-floor.md
+++ 
b/docs/sql-manual/sql-functions/scalar-functions/date-time-functions/second-floor.md
@@ -64,6 +64,14 @@ SELECT SECOND_FLOOR('2025-01-23 12:34:56', 5) AS result;
 | 2025-01-23 12:34:55 |
 +---------------------+
 
+-- Only with origin date and specified date
+select second_floor("2023-07-13 22:28:18", "2023-07-13 22:13:12.123");
++----------------------------------------------------------------+
+| second_floor("2023-07-13 22:28:18", "2023-07-13 22:13:12.123") |
++----------------------------------------------------------------+
+| 2023-07-13 22:28:17.123                                        |
++----------------------------------------------------------------+
+
 -- Specify starting time (origin)
 SELECT SECOND_FLOOR('2025-01-23 12:34:56', 10, '2025-01-23 12:00:00') AS 
result;
 +---------------------+
diff --git 
a/docs/sql-manual/sql-functions/scalar-functions/date-time-functions/week-ceil.md
 
b/docs/sql-manual/sql-functions/scalar-functions/date-time-functions/week-ceil.md
index 53a5153db3d..9c7ac364669 100644
--- 
a/docs/sql-manual/sql-functions/scalar-functions/date-time-functions/week-ceil.md
+++ 
b/docs/sql-manual/sql-functions/scalar-functions/date-time-functions/week-ceil.md
@@ -85,6 +85,14 @@ mysql> SELECT WEEK_CEIL('2023-07-13 22:28:18.123', 2) AS 
result;
 | 2023-07-24 00:00:00.000 |
 +-------------------------+
 
+-- Only with origin date and specified date
+select week_ceil("2023-07-13 22:28:18", "2021-05-01 12:00:00");
++---------------------------------------------------------+
+| week_ceil("2023-07-13 22:28:18", "2021-05-01 12:00:00") |
++---------------------------------------------------------+
+| 2023-07-15 12:00:00                                     |
++---------------------------------------------------------+
+
 -- Specify origin date
 SELECT WEEK_CEIL('2023-07-13', 1, '2023-07-03') AS result;
 +---------------------+
diff --git 
a/docs/sql-manual/sql-functions/scalar-functions/date-time-functions/week-floor.md
 
b/docs/sql-manual/sql-functions/scalar-functions/date-time-functions/week-floor.md
index cf328a71378..9936737c36d 100644
--- 
a/docs/sql-manual/sql-functions/scalar-functions/date-time-functions/week-floor.md
+++ 
b/docs/sql-manual/sql-functions/scalar-functions/date-time-functions/week-floor.md
@@ -79,6 +79,14 @@ SELECT WEEK_FLOOR(cast('2023-07-13' as date)) AS result;
 | 2023-07-10 |
 +------------+
 
+-- Only with origin date and specified date
+select week_floor("2023-07-13 22:28:18", "2021-05-01 12:00:00");
++----------------------------------------------------------+
+| week_floor("2023-07-13 22:28:18", "2021-05-01 12:00:00") |
++----------------------------------------------------------+
+| 2023-07-08 12:00:00                                      |
++----------------------------------------------------------+
+
 -- Specify origin='2023-07-03' (Monday), 1-week interval
 SELECT WEEK_FLOOR('2023-07-13', 1, '2023-07-03') AS result;
 +---------------------+
diff --git 
a/docs/sql-manual/sql-functions/scalar-functions/date-time-functions/year-ceil.md
 
b/docs/sql-manual/sql-functions/scalar-functions/date-time-functions/year-ceil.md
index 19aa2216182..b78f66dc698 100644
--- 
a/docs/sql-manual/sql-functions/scalar-functions/date-time-functions/year-ceil.md
+++ 
b/docs/sql-manual/sql-functions/scalar-functions/date-time-functions/year-ceil.md
@@ -74,6 +74,14 @@ SELECT YEAR_CEIL(cast('2023-07-13' as date)) AS result;
 | 2024-01-01 |
 +------------+
 
+-- Only with origin date and specified date
+select year_ceil("2023-07-13 22:28:18", "2021-03-13 22:13:00");
++---------------------------------------------------------+
+| year_ceil("2023-07-13 22:28:18", "2021-03-13 22:13:00") |
++---------------------------------------------------------+
+| 2024-03-13 22:13:00                                     |
++---------------------------------------------------------+
+
 -- Specify origin reference point='2020-01-01', 1-year interval, 2023-07-13 
rounds to 2024-01-01
 SELECT YEAR_CEIL('2023-07-13', 1, '2020-01-01') AS result;
 +---------------------+
diff --git 
a/docs/sql-manual/sql-functions/scalar-functions/date-time-functions/year-floor.md
 
b/docs/sql-manual/sql-functions/scalar-functions/date-time-functions/year-floor.md
index f39838af03b..113eaacd3da 100644
--- 
a/docs/sql-manual/sql-functions/scalar-functions/date-time-functions/year-floor.md
+++ 
b/docs/sql-manual/sql-functions/scalar-functions/date-time-functions/year-floor.md
@@ -79,6 +79,14 @@ SELECT YEAR_FLOOR(cast('2023-07-13' as date)) AS result;
 | 2023-01-01 |
 +------------+
 
+-- Only with origin date and specified date
+select year_floor("2023-07-13 22:28:18", "2021-03-13 22:13:00");
++----------------------------------------------------------+
+| year_floor("2023-07-13 22:28:18", "2021-03-13 22:13:00") |
++----------------------------------------------------------+
+| 2023-03-13 22:13:00                                      |
++----------------------------------------------------------+
+
 -- Specify origin reference point='2020-01-01', 1-year interval, 2023-07-13 
rounds to 2023-01-01
 SELECT YEAR_FLOOR('2023-07-13', 1, '2020-01-01') AS result;
 +---------------------+
diff --git 
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/scalar-functions/date-time-functions/day-ceil.md
 
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/scalar-functions/date-time-functions/day-ceil.md
index 486e3d4a082..9b3c576ba5c 100644
--- 
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/scalar-functions/date-time-functions/day-ceil.md
+++ 
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/scalar-functions/date-time-functions/day-ceil.md
@@ -79,6 +79,14 @@ select day_ceil("2023-07-13 22:28:18");
 | 2023-07-14 00:00:00             |
 +---------------------------------+
 
+-- 只有起始日期和指定日期
+select day_ceil("2023-07-13 22:28:18", "2021-07-01 12:22:34");
++--------------------------------------------------------+
+| day_ceil("2023-07-13 22:28:18", "2021-07-01 12:22:34") |
++--------------------------------------------------------+
+| 2023-07-14 12:22:34                                    |
++--------------------------------------------------------+
+
 -- 指定周期为 7 天(1 周),自定义基准时间为 2023-01-01 00:00:00
 select day_ceil("2023-07-13 22:28:18", 7, "2023-01-01 00:00:00");
 +-----------------------------------------------------------+
diff --git 
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/scalar-functions/date-time-functions/day-floor.md
 
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/scalar-functions/date-time-functions/day-floor.md
index b8f6daface0..dd12d0d333b 100644
--- 
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/scalar-functions/date-time-functions/day-floor.md
+++ 
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/scalar-functions/date-time-functions/day-floor.md
@@ -70,6 +70,14 @@ mysql> select day_floor("2023-07-13 22:28:18.123", 5);
 | 2023-07-10 00:00:00.000                 |
 +-----------------------------------------+
 
+-- 只有起始日期和指定日期
+select day_floor("2023-07-13 22:28:18", "2023-01-01 12:00:00");
++---------------------------------------------------------+
+| day_floor("2023-07-13 22:28:18", "2023-01-01 12:00:00") |
++---------------------------------------------------------+
+| 2023-07-13 12:00:00                                     |
++---------------------------------------------------------+
+
 -- 输入参数不带有周期,默认一天为一周期
 select day_floor("2023-07-13 22:28:18");
 +----------------------------------+
diff --git 
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/scalar-functions/date-time-functions/hour-ceil.md
 
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/scalar-functions/date-time-functions/hour-ceil.md
index 2f630e2f98d..51d5084058a 100644
--- 
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/scalar-functions/date-time-functions/hour-ceil.md
+++ 
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/scalar-functions/date-time-functions/hour-ceil.md
@@ -65,6 +65,14 @@ mysql> select hour_ceil('2023-07-13 19:30:00', 4, 
'2023-07-13 08:00:00') as cust
 | 2023-07-13 20:00:00        |
 +----------------------------+
 
+-- 只有起始日期和指定日期
+select hour_ceil("2023-07-13 22:28:18", "2023-07-01 12:12:00");
++---------------------------------------------------------+
+| hour_ceil("2023-07-13 22:28:18", "2023-07-01 12:12:00") |
++---------------------------------------------------------+
+| 2023-07-13 23:12:00                                     |
++---------------------------------------------------------+
+
 -- 输入 date 类型,则会转换为 对应日期的起点时间 00:00:00
 mysql> select hour_ceil('2023-07-13 00:30:00', 6, '2023-07-13');
 +---------------------------------------------------+
diff --git 
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/scalar-functions/date-time-functions/hour-floor.md
 
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/scalar-functions/date-time-functions/hour-floor.md
index 81cb287059c..4a72024440b 100644
--- 
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/scalar-functions/date-time-functions/hour-floor.md
+++ 
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/scalar-functions/date-time-functions/hour-floor.md
@@ -73,6 +73,14 @@ select hour_floor("2023-07-13 18:00:00", 5);
 | 2023-07-13 18:00:00                  |
 +--------------------------------------+
 
+-- 只有起始日期和指定日期
+select hour_floor("2023-07-13 22:28:18", "2023-07-01 12:12:00");
++----------------------------------------------------------+
+| hour_floor("2023-07-13 22:28:18", "2023-07-01 12:12:00") |
++----------------------------------------------------------+
+| 2023-07-13 22:12:00                                      |
++----------------------------------------------------------+
+
 -- 输入 date 类型,会转换为一天 起始时间 2023-07-13 00:00:00
 mysql> select hour_floor('2023-07-13 20:30:00', 4, '2023-07-13');
 +----------------------------------------------------+
diff --git 
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/scalar-functions/date-time-functions/minute-ceil.md
 
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/scalar-functions/date-time-functions/minute-ceil.md
index e58bc6b29ae..b51f3409e5f 100644
--- 
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/scalar-functions/date-time-functions/minute-ceil.md
+++ 
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/scalar-functions/date-time-functions/minute-ceil.md
@@ -85,6 +85,14 @@ SELECT MINUTE_CEIL('2023-07-13 22:28:18', 5, '2023-07-13 
22:20:00') AS result;
 | 2023-07-13 22:30:00       |
 +----------------------------+
 
+-- 只有起始日期和指定日
+select minute_ceil("2023-07-13 22:28:18", "2023-07-01 12:21:23");
++-----------------------------------------------------------+
+| minute_ceil("2023-07-13 22:28:18", "2023-07-01 12:21:23") |
++-----------------------------------------------------------+
+| 2023-07-13 22:28:23                                       |
++-----------------------------------------------------------+
+
 -- 带有 scale 的 datetime,会把小数位全部截断为 0
 SELECT MINUTE_CEIL('2023-07-13 22:28:18.456789', 5) AS result;
 +----------------------------+
diff --git 
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/scalar-functions/date-time-functions/minute-floor.md
 
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/scalar-functions/date-time-functions/minute-floor.md
index 78ffe9e59e1..9dc3dab46c1 100644
--- 
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/scalar-functions/date-time-functions/minute-floor.md
+++ 
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/scalar-functions/date-time-functions/minute-floor.md
@@ -85,6 +85,14 @@ SELECT MINUTE_FLOOR('2023-07-13 22:28:18', 5, '2023-07-13 
22:20:00') AS result;
 | 2023-07-13 22:25:00 |
 +---------------------+
 
+-- 只有起始日期和指定日期
+select minute_floor("2023-07-13 22:28:18", "2023-07-01 12:21:23");
++------------------------------------------------------------+
+| minute_floor("2023-07-13 22:28:18", "2023-07-01 12:21:23") |
++------------------------------------------------------------+
+| 2023-07-13 22:27:23                                        |
++------------------------------------------------------------+
+
 --- 带有 scale 的 datetime,会把小数位全部截断为 0
 SELECT MINUTE_FLOOR('2023-07-13 22:28:18.456789', 5) AS result;
 +----------------------------+
diff --git 
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/scalar-functions/date-time-functions/month-ceil.md
 
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/scalar-functions/date-time-functions/month-ceil.md
index 4a55b93edf3..fe34f83f18d 100644
--- 
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/scalar-functions/date-time-functions/month-ceil.md
+++ 
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/scalar-functions/date-time-functions/month-ceil.md
@@ -68,6 +68,14 @@ SELECT MONTH_CEIL('2023-07-13 22:28:18', 5) AS result;
 | 2023-12-01 00:00:00 |
 +---------------------+
 
+-- 只有起始日期和指定日期
+select month_ceil("2023-07-13 22:28:18", "2022-07-04 00:00:00");
++----------------------------------------------------------+
+| month_ceil("2023-07-13 22:28:18", "2022-07-04 00:00:00") |
++----------------------------------------------------------+
+| 2023-08-04 00:00:00                                      |
++----------------------------------------------------------+
+
 -- 输入日期时间恰好在周期起点,则返回输入日期时间
 SELECT MONTH_CEIL('2023-12-01 00:00:00', 5) AS result;
 +----------------------------+
diff --git 
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/scalar-functions/date-time-functions/month-floor.md
 
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/scalar-functions/date-time-functions/month-floor.md
index 90cc69bf6a5..8698893363c 100644
--- 
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/scalar-functions/date-time-functions/month-floor.md
+++ 
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/scalar-functions/date-time-functions/month-floor.md
@@ -76,6 +76,14 @@ SELECT MONTH_FLOOR('2023-06-01 00:00:00', 5) AS result;
 | 2023-06-01 00:00:00 |
 +---------------------+
 
+-- 只有起始日期和指定日期
+ select month_floor("2023-07-13 22:28:18", "2023-01-04 00:00:00");
++-----------------------------------------------------------+
+| month_floor("2023-07-13 22:28:18", "2023-01-04 00:00:00") |
++-----------------------------------------------------------+
+| 2023-07-04 00:00:00                                       |
++-----------------------------------------------------------+
+
 -- 指定起始时间(origin)
 SELECT MONTH_FLOOR('2023-07-13 22:28:18', 5, '2023-01-01 00:00:00') AS result;
 +---------------------+
diff --git 
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/scalar-functions/date-time-functions/quarter-ceil.md
 
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/scalar-functions/date-time-functions/quarter-ceil.md
index 613b71534ab..b03f7f9e34d 100644
--- 
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/scalar-functions/date-time-functions/quarter-ceil.md
+++ 
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/scalar-functions/date-time-functions/quarter-ceil.md
@@ -7,7 +7,7 @@
 
 ## 描述
 
-将日期时间值向上取整到最近的指定季度周期的下个周期起点。如果指定了起始时间(origin),则以该时间为基准计算周期。
+QUARTER_CEIL 
函数用于将输入的日期时间值向上取整到最近的指定季度周期。若指定起始时间(origin),则以该时间为基准划分周期并取整;若未指定,默认以 0001-01-01 
00:00:00 为基准。该函数支持处理 DATETIME、DATE 类型。
 
 日期计算公式:
 $$
@@ -22,58 +22,115 @@ $k$ 代表基准时间到达目标时间所需的周期数
 ## 语法
 
 ```sql
-QUARTER_CEIL(<datetime>)
-QUARTER_CEIL(<datetime>, <origin>)
-QUARTER_CEIL(<datetime>, <period>)
-QUARTER_CEIL(<datetime>, <period>, <origin>)
+QUARTER_CEIL(`<date_or_time_expr>`)
+QUARTER_CEIL(`<date_or_time_expr>`, `<origin>`)
+QUARTER_CEIL(`<date_or_time_expr>`, `<period>`)
+QUARTER_CEIL(`<date_or_time_expr>`, `<period>`, `<origin>`)
 ```
 
 ## 参数
 
 | 参数 | 说明 |
 | ---- | ---- |
-| `<datetime>` | 需要向上取整的日期时间值,类型为 DATE 或 DATETIME |
+| `<date_or_time_expr>` | 需要向上取整的日期时间值,参数是合法的日期表达式,支持输入 date/datetime 类型,具体 
datetime 和 date 格式请查看 [datetime 
的转换](../../../../../current/sql-manual/basic-element/sql-data-types/conversion/datetime-conversion)
 和 [date 
的转换](../../../../../current/sql-manual/basic-element/sql-data-types/conversion/date-conversion)
 |
 | `<period>` | 季度周期值,类型为 INT,表示每个周期包含的季度数 |
-| `<origin>` | 周期的起始时间点,类型为 DATE 或 DATETIME,默认值为 0001-01-01 00:00:00 |
-
-注意:
-- 不指定 period 时,等价于以 1 个季度为周期
-- 当 period 不为正整数时,函数结果将为 NULL
-- 结果总是向过去时间取整
-- 返回值的时间部分总是 00:00:00
+| `<origin>` | 周期的起始时间点,支持输入 date/datetime 类型,默认值为 0001-01-01 00:00:00 |
 
 ## 返回值
 
-当 `<datetime>` 为 DATE 类型时,返回类型为 DATE。
-当 `<datetime>` 为 DATETIME 类型时,返回类型为 DATETIME。
-表示向上取整后的日期时间值。结果的时间部分将被设置为 00:00:00。
-
-## 举例
+返回类型为 DATETIME,返回以输入日期时间为基准,向上取整到最近的指定季度周期后的时间值。返回值的精度与输入参数 datetime 的精度相同。
 
-从 '0001-01-01 00:00:00' 开始,每 5 / 4 个季度为一个周期,返回距离输入日期最近的下一个周期起点。
-```sql
-SELECT QUARTER_CEIL("2023-07-13 22:28:18", 5), QUARTER_CEIL("2023-07-13 
22:28:18", 4);
-```
+- 若 `<period>` 为非正,返回错误。
+- 若任一参数为 NULL,返回 NULL。
+- 不指定 period 时,默认以 1 个季度为周期。
+- `<origin>` 未指定,默认以 0001-01-01 00:00:00 为基准。
+- 输入为 DATE 类型(默认时间设置为 00:00:00)。
+- 计算结果超过日期最大范围 9999-12-31 23:59:59,结果返回错误
+- 若 `<origin>` 日期时间在 `<period>` 之后,也会按照上述公式计算,不过周期 k 为负数。
+- 若 `date_or_time_expr` 带有 scale,则返回结果也带有 scale 且小数部分为零.
 
-```text
-+----------------------------------------+----------------------------------------+
-| QUARTER_CEIL("2023-07-13 22:28:18", 5) | QUARTER_CEIL("2023-07-13 22:28:18", 
4) |
-+----------------------------------------+----------------------------------------+
-| 2024-10-01 00:00:00.000000             | 2024-01-01 00:00:00.000000          
   |
-+----------------------------------------+----------------------------------------+
-```
+## 举例
 
-以 '2022-01-01 00:00:00' 为周期起点,分别以 2 / 4 个季度为一个周期,返回距离输入日期最近的下一个周期起点。
 ```sql
-SELECT QUARTER_CEIL("2023-03-13 22:28:18", 2, "2022-01-01 00:00:00"), 
QUARTER_CEIL("2023-07-13 22:28:18", 4, "2022-01-01 00:00:00");
-```
-
-```text
-+---------------------------------------------------------------+---------------------------------------------------------------+
-| QUARTER_CEIL("2023-03-13 22:28:18", 2, "2022-01-01 00:00:00") | 
QUARTER_CEIL("2023-07-13 22:28:18", 4, "2022-01-01 00:00:00") |
-+---------------------------------------------------------------+---------------------------------------------------------------+
-| 2023-07-01 00:00:00                                           | 2024-01-01 
00:00:00                                           |
-+---------------------------------------------------------------+---------------------------------------------------------------+
+-- 以默认周期1个季度,默认起始时间 0001-01-01 00:00:00
+SELECT QUARTER_CEIL('2023-07-13 22:28:18') AS result;
++---------------------+
+| result              |
++---------------------+
+| 2023-10-01 00:00:00 |
++---------------------+
+
+-- 以5个季度为一周期,以默认起始点的向上取整结果
+SELECT QUARTER_CEIL('2023-07-13 22:28:18', 5) AS result;
++---------------------+
+| result              |
++---------------------+
+| 2024-10-01 00:00:00 |
++---------------------+
+
+-- 只有起始日期和指定日期
+select QUARTER_CEIL("2023-07-13 22:28:18", "2022-07-01 00:00:00");
++-------------------------------------------------------------+
+| QUARTER_CEIL("2023-07-13 22:28:18", "2022-07-01 00:00:00") |
++-------------------------------------------------------------+
+| 2023-10-01 00:00:00                                         |
++-------------------------------------------------------------+
+
+-- 输入日期时间恰好在周期起点,则返回输入日期时间
+SELECT QUARTER_CEIL('2023-10-01 00:00:00', 1) AS result;
++----------------------------+
+| result                     |
++----------------------------+
+| 2023-10-01 00:00:00        |
++----------------------------+
+
+-- 指定起始时间(origin)
+SELECT QUARTER_CEIL('2023-07-13 22:28:18', 2, '2023-01-01 00:00:00') AS result;
++---------------------+
+| result              |
++---------------------+
+| 2024-01-01 00:00:00 |
++---------------------+
+
+--- 带有 scale 的 datetime,时间部分及小数位均截断为 0
+SELECT QUARTER_CEIL('2023-07-13 22:28:18.456789', 1) AS result;
++----------------------------+
+| result                     |
++----------------------------+
+| 2023-10-01 00:00:00.000000 |
++----------------------------+
+
+--- 若 <origin> 日期时间在 <period> 之后,也会按照上述公式计算,不过周期 k 为负数。
+SELECT QUARTER_CEIL('2022-09-13 22:28:18', 4, '2028-07-01 00:00:00') AS result;
++---------------------+
+| result              |
++---------------------+
+| 2024-07-01 00:00:00 |
++---------------------+
+
+--- 输入为 DATE 类型(默认时间 00:00:00)
+SELECT QUARTER_CEIL('2023-07-13', 1) AS result;
++---------------------+
+| result              |
++---------------------+
+| 2023-10-01 00:00:00 |
++---------------------+
+
+-- 计算结果超过日期最大范围 9999-12-31,结果返回错误
+SELECT QUARTER_CEIL('9999-10-13 22:28:18', 2) AS result;
+ERROR 1105 (HY000): errCode = 2, detailMessage = (10.16.10.3)[E-218]Operation 
quarter_ceil of 9999-10-13 22:28:18, 2 out of range
+
+--- 周期为非正数,返回错误
+SELECT QUARTER_CEIL('2023-07-13 22:28:18', -1) AS result;
+ERROR 1105 (HY000): errCode = 2, detailMessage = (10.16.10.3)[E-218]Operation 
quarter_ceil of 2023-07-13 22:28:18, -1 out of range
+
+--- 任一参数为 NULL,返回 NULL
+SELECT QUARTER_CEIL(NULL, 1), QUARTER_CEIL('2023-07-13 22:28:18', NULL) AS 
result;
++-----------------------+--------+
+| quarter_ceil(NULL, 1) | result |
++-----------------------+--------+
+| NULL                  | NULL   |
++-----------------------+--------+
 ```
 
 ## 最佳实践
diff --git 
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/scalar-functions/date-time-functions/quarter-floor.md
 
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/scalar-functions/date-time-functions/quarter-floor.md
index b9c8efb66f9..6efbedbcca5 100644
--- 
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/scalar-functions/date-time-functions/quarter-floor.md
+++ 
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/scalar-functions/date-time-functions/quarter-floor.md
@@ -7,7 +7,9 @@
 
 ## 描述
 
-将日期时间值向下取整到最近的指定季度周期起点。如果指定了起始时间(origin),则以该时间为基准计算周期。
+QUARTER_FLOOR 
函数用于将输入的日期时间值向下取整到最近的指定季度周期。若指定起始时间(origin),则以该时间为基准划分周期并取整;若未指定,默认以 0001-01-01 
00:00:00 为基准。该函数支持处理 DATETIME 和 DATE 类型。
+
+日期时间的计算公式:
 
 $$
 \begin{aligned}
@@ -16,62 +18,115 @@ $$
 &k \in \mathbb{Z} \land \langle\text{origin}\rangle + k \times 
\langle\text{period}\rangle \times \text{quarter} \leq 
\langle\text{date\_or\_time\_expr}\rangle\}
 \end{aligned}
 $$
-$k$ 代表基准时间到目标时间所需要的周期数
+$k$ 代表的是基准时间到目标时间的周期数
 
 ## 语法
 
 ```sql
-QUARTER_FLOOR(<datetime>)
-QUARTER_FLOOR(<datetime>, <origin>)
-QUARTER_FLOOR(<datetime>, <period>)
-QUARTER_FLOOR(<datetime>, <period>, <origin>)
+QUARTER_FLOOR(`<date_or_time_expr>`)
+QUARTER_FLOOR(`<date_or_time_expr>`, `<origin>`)
+QUARTER_FLOOR(`<date_or_time_expr>`, `<period>`)
+QUARTER_FLOOR(`<date_or_time_expr>`, `<period>`, `<origin>`)
 ```
 
 ## 参数
 
 | 参数 | 说明 |
 | ---- | ---- |
-| `<datetime>` | 需要向下取整的日期时间值,类型为 DATE 或 DATETIME |
+| `<date_or_time_expr>` | 需要向下取整的日期时间值,类型为 DATETIME 或 DATE ,具体 datetime/date 
格式请查看 [datetime 
的转换](../../../../../current/sql-manual/basic-element/sql-data-types/conversion/datetime-conversion)
 和 [date 
的转换](../../../../../current/sql-manual/basic-element/sql-data-types/conversion/date-conversion)|
 | `<period>` | 季度周期值,类型为 INT,表示每个周期包含的季度数 |
-| `<origin>` | 周期的起始时间点,类型为 DATE 或 DATETIME,默认值为 0001-01-01 00:00:00 |
-
-注意:
-- 不指定 period 时,等价于以 1 个季度为周期
-- 当 period 不为正整数时,函数结果将为 NULL
-- 结果总是向过去时间取整
-- 返回值的时间部分总是 00:00:00
+| `<origin_datetime>` | 周期的起始时间点,类型为 DATETIME/DATE ,默认值为 0001-01-01 00:00:00 |
 
 ## 返回值
 
-当 `<datetime>` 为 DATE 类型时,返回类型为 DATE。
-当 `<datetime>` 为 DATETIME 类型时,返回类型为 DATETIME。
-结果的时间部分将被设置为 00:00:00。
+返回类型为 DATETIME,返回以输入日期时间为基准,向下取整到最近的指定季度周期后的时间值。返回值的精度与输入参数 datetime 的精度相同。
 
-## 举例
-
-从 '0001-01-01 00:00:00' 开始,每 5 / 4 个季度为一个周期,返回距离输入日期最近的周期起点。
-```sql
-SELECT QUARTER_FLOOR("2023-07-13 22:28:18", 5), QUARTER_FLOOR("2023-07-13 
22:28:18", 4);
-```
+- 若 `<period>` 为非正(≤0),返回错误。
+- 若任一参数为 NULL,返回 NULL。
+- 不指定 period 时,默认以 1 个季度为周期。
+- `<origin>` 未指定,默认以 0001-01-01 00:00:00 为基准。
+- 若输入为 DATE 类型(仅包含年月日),默认其时间部分为 00:00:00。
+- 若 `<origin>` 日期时间在 `<period>` 之后,也会按照上述公式计算,不过周期 k 为负数。
+- 若 `date_or_time_expr` 带有 scale,则返回结果也带有 scale 且小数部分为零.
 
-```text
-+-----------------------------------------+-----------------------------------------+
-| QUARTER_FLOOR("2023-07-13 22:28:18", 5) | QUARTER_FLOOR("2023-07-13 
22:28:18", 4) |
-+-----------------------------------------+-----------------------------------------+
-| 2023-07-01 00:00:00.000000              | 2023-01-01 00:00:00.000000         
     |
-+-----------------------------------------+-----------------------------------------+
-```
+## 举例
 
 ```sql
-SELECT QUARTER_FLOOR("2023-07-13 22:28:18", 2, "2022-01-01 00:00:00"), 
QUARTER_FLOOR("2023-07-13 22:28:18", 4, "2022-01-01 00:00:00");
-```
-
-```text
-+----------------------------------------------------------------+----------------------------------------------------------------+
-| QUARTER_FLOOR("2023-07-13 22:28:18", 2, "2022-01-01 00:00:00") | 
QUARTER_FLOOR("2023-07-13 22:28:18", 4, "2022-01-01 00:00:00") |
-+----------------------------------------------------------------+----------------------------------------------------------------+
-| 2023-07-01 00:00:00                                            | 2023-01-01 
00:00:00                                            |
-+----------------------------------------------------------------+----------------------------------------------------------------+
+-- 以默认周期1个季度,默认起始时间 0001-01-01 00:00:00
+SELECT QUARTER_FLOOR('2023-07-13 22:28:18') AS result;
++---------------------+
+| result              |
++---------------------+
+| 2023-07-01 00:00:00 |
++---------------------+
+
+-- 以5个季度为一周期,以默认的起始点的向下取整结果
+SELECT QUARTER_FLOOR('2023-07-13 22:28:18', 5) AS result;
++---------------------+
+| result              |
++---------------------+
+| 2023-07-01 00:00:00 |
++---------------------+
+
+-- 输入日期时间恰好是周期起点,则返回输入日期时间
+SELECT QUARTER_FLOOR('2023-07-01 00:00:00', 1) AS result;
++---------------------+
+| result              |
++---------------------+
+| 2023-07-01 00:00:00 |
++---------------------+
+
+-- 只有起始日期和指定日期
+select QUARTER_FLOOR("2023-07-13 22:28:18", "2023-01-01 00:00:00");
++-------------------------------------------------------------+
+| QUARTER_FLOOR("2023-07-13 22:28:18", "2023-01-01 00:00:00") |
++-------------------------------------------------------------+
+| 2023-07-01 00:00:00                                         |
++-------------------------------------------------------------+
+
+-- 指定起始时间(origin)
+SELECT QUARTER_FLOOR('2023-07-13 22:28:18', 2, '2023-01-01 00:00:00') AS 
result;
++---------------------+
+| result              |
++---------------------+
+| 2023-01-01 00:00:00 |
++---------------------+
+
+--- 带有 scale 的 datetime,会把小数位全部截断为 0
+SELECT QUARTER_FLOOR('2023-07-13 22:28:18.456789', 1) AS result;
++----------------------------+
+| result                     |
++----------------------------+
+| 2023-07-01 00:00:00.000000 |
++----------------------------+
+
+--- 若 <origin> 日期时间在 <period> 之后,也会按照上述公式计算,不过周期 k 为负数。
+SELECT QUARTER_FLOOR('2022-09-13 22:28:18', 4, '2028-07-01 00:00:00') AS 
result;
++---------------------+
+| result              |
++---------------------+
+| 2020-07-01 00:00:00 |
++---------------------+
+
+--- 输入为 DATE 类型(默认时间 00:00:00)
+SELECT QUARTER_FLOOR('2023-07-13', 1) AS result;
++---------------------+
+| result              |
++---------------------+
+| 2023-07-01 00:00:00 |
++---------------------+
+
+--- 周期为非正数,返回错误
+SELECT QUARTER_FLOOR('2023-07-13 22:28:18', -1) AS result;
+ERROR 1105 (HY000): errCode = 2, detailMessage = (10.16.10.3)[E-218]Operation 
quarter_floor of 2023-07-13 22:28:18, -1 out of range
+
+--- 任一参数为 NULL,返回 NULL
+SELECT QUARTER_FLOOR(NULL, 1), QUARTER_FLOOR('2023-07-13 22:28:18', NULL) AS 
result;
++------------------------+--------+
+| quarter_floor(NULL, 1) | result |
++------------------------+--------+
+| NULL                   | NULL   |
++------------------------+--------+
 ```
 
 ## 最佳实践
diff --git 
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/scalar-functions/date-time-functions/second-ceil.md
 
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/scalar-functions/date-time-functions/second-ceil.md
index 549bbfc1dc0..1af3f590ba5 100644
--- 
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/scalar-functions/date-time-functions/second-ceil.md
+++ 
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/scalar-functions/date-time-functions/second-ceil.md
@@ -72,6 +72,14 @@ SELECT SECOND_CEIL('2025-01-23 12:34:56', 10, '2025-01-23 
12:00:00') AS result;
 | 2025-01-23 12:35:00 |
 +---------------------+
 
+-- 只有起始日期和指定日期
+select second_ceil("2023-07-13 22:28:18", "2023-07-13 22:13:12.123");
++---------------------------------------------------------------+
+| second_ceil("2023-07-13 22:28:18", "2023-07-13 22:13:12.123") |
++---------------------------------------------------------------+
+| 2023-07-13 22:28:18.123                                       |
++---------------------------------------------------------------+
+
 -- 若 `<origin>` 日期在 `<period>` 之后,也按照上述公式计算,不过 k 代入负数
 SELECT SECOND_CEIL('2025-01-23 12:34:56', 10, '2029-01-23 12:00:00') AS result;
 +---------------------+
diff --git 
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/scalar-functions/date-time-functions/second-floor.md
 
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/scalar-functions/date-time-functions/second-floor.md
index 32e96c5850e..83fef7628be 100644
--- 
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/scalar-functions/date-time-functions/second-floor.md
+++ 
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/scalar-functions/date-time-functions/second-floor.md
@@ -63,6 +63,14 @@ SELECT SECOND_FLOOR('2025-01-23 12:34:56', 5) AS result;
 | 2025-01-23 12:34:55 |
 +---------------------+
 
+-- 只有起始日期和指定日期
+select second_floor("2023-07-13 22:28:18", "2023-07-13 22:13:12.123");
++----------------------------------------------------------------+
+| second_floor("2023-07-13 22:28:18", "2023-07-13 22:13:12.123") |
++----------------------------------------------------------------+
+| 2023-07-13 22:28:17.123                                        |
++----------------------------------------------------------------+
+
 -- 指定起始时间(origin)
 SELECT SECOND_FLOOR('2025-01-23 12:34:56', 10, '2025-01-23 12:00:00') AS 
result;
 +---------------------+
diff --git 
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/scalar-functions/date-time-functions/week-ceil.md
 
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/scalar-functions/date-time-functions/week-ceil.md
index fd1a5749025..e68465e9087 100644
--- 
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/scalar-functions/date-time-functions/week-ceil.md
+++ 
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/scalar-functions/date-time-functions/week-ceil.md
@@ -93,6 +93,14 @@ SELECT WEEK_CEIL(cast('2023-07-13' as date));
 | 2023-07-17                            |
 +---------------------------------------+
 
+-- 只有起始日期和指定日期
+select week_ceil("2023-07-13 22:28:18", "2021-05-01 12:00:00");
++---------------------------------------------------------+
+| week_ceil("2023-07-13 22:28:18", "2021-05-01 12:00:00") |
++---------------------------------------------------------+
+| 2023-07-15 12:00:00                                     |
++---------------------------------------------------------+
+
 ---指定起始日期
 SELECT WEEK_CEIL('2023-07-13', 1, '2023-07-03') AS result;
 +---------------------+
diff --git 
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/scalar-functions/date-time-functions/week-floor.md
 
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/scalar-functions/date-time-functions/week-floor.md
index 1f755914566..58ff88c07e6 100644
--- 
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/scalar-functions/date-time-functions/week-floor.md
+++ 
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/scalar-functions/date-time-functions/week-floor.md
@@ -93,6 +93,14 @@ SELECT WEEK_FLOOR(cast('2023-07-13' as date)) AS result;
 | 2023-07-10 |
 +------------+
 
+-- 只有起始日期和指定日期
+select week_floor("2023-07-13 22:28:18", "2021-05-01 12:00:00");
++----------------------------------------------------------+
+| week_floor("2023-07-13 22:28:18", "2021-05-01 12:00:00") |
++----------------------------------------------------------+
+| 2023-07-08 12:00:00                                      |
++----------------------------------------------------------+
+
 -- 指定基准时间origin='2023-07-03'(周一),1周间隔
 SELECT WEEK_FLOOR('2023-07-13', 1, '2023-07-03') AS result;
 +---------------------+
diff --git 
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/scalar-functions/date-time-functions/year-ceil.md
 
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/scalar-functions/date-time-functions/year-ceil.md
index a6cd9569f8d..adb7ff8ce24 100644
--- 
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/scalar-functions/date-time-functions/year-ceil.md
+++ 
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/scalar-functions/date-time-functions/year-ceil.md
@@ -76,6 +76,14 @@ mysql> SELECT YEAR_CEIL('2023-07-13 22:28:18.123', 5) AS 
result;
 | 2026-01-01 00:00:00.000 |
 +-------------------------+
 
+-- 只有起始日期和指定日期
+select year_ceil("2023-07-13 22:28:18", "2021-03-13 22:13:00");
++---------------------------------------------------------+
+| year_ceil("2023-07-13 22:28:18", "2021-03-13 22:13:00") |
++---------------------------------------------------------+
+| 2024-03-13 22:13:00                                     |
++---------------------------------------------------------+
+
 -- 输入为DATE类型,返回DATE类型的间隔起点
 SELECT YEAR_CEIL(cast('2023-07-13' as date)) AS result;
 +------------+
diff --git 
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/scalar-functions/date-time-functions/year-floor.md
 
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/scalar-functions/date-time-functions/year-floor.md
index 0bdae798648..8a3dbb97276 100644
--- 
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/scalar-functions/date-time-functions/year-floor.md
+++ 
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/scalar-functions/date-time-functions/year-floor.md
@@ -71,6 +71,14 @@ mysql> SELECT YEAR_FLOOR('2023-07-13 22:28:18.123', 5) AS 
result;
 | 2021-01-01 00:00:00.000 |
 +-------------------------+
 
+-- 只有起始日期和指定日期
+select year_floor("2023-07-13 22:28:18", "2021-03-13 22:13:00");
++----------------------------------------------------------+
+| year_floor("2023-07-13 22:28:18", "2021-03-13 22:13:00") |
++----------------------------------------------------------+
+| 2023-03-13 22:13:00                                      |
++----------------------------------------------------------+
+
 -- 输入为DATE类型,返回DATE类型的间隔起点
 SELECT YEAR_FLOOR(cast('2023-07-13' as date)) AS result;
 +------------+


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to