メインコンテンツまでスキップ
バージョン: 4.x

TO_MONDAY

to_monday

説明

構文

DATE to_monday(DATETIME date)

日付またはdatetimeを最も近い月曜日に切り下げ、戻り値の型はDateまたはDateV2です。 特に、入力が1970-01-01、1970-01-02、1970-01-03、1970-01-04の場合は'1970-01-01'を返します。

MySQL [(none)]> select to_monday('2022-09-10');
+----------------------------------+
| to_monday('2022-09-10 00:00:00') |
+----------------------------------+
| 2022-09-05 |
+----------------------------------+

keywords

MONDAY
このページでは