diff --git a/core/modules/views/src/Plugin/views/query/MysqlDateSql.php b/core/modules/views/src/Plugin/views/query/MysqlDateSql.php
index 00ad873b83a8e076f56c1becc060c9cce61866ab..07ea4c4a38ae0001f10ed732309b63aba9a7ecf5 100644
--- a/core/modules/views/src/Plugin/views/query/MysqlDateSql.php
+++ b/core/modules/views/src/Plugin/views/query/MysqlDateSql.php
@@ -27,6 +27,7 @@ class MysqlDateSql implements DateSqlInterface {
   protected static $replace = [
     'Y' => '%Y',
     'y' => '%y',
+    'o' => '%x',
     'M' => '%b',
     'm' => '%m',
     'n' => '%c',
diff --git a/core/modules/views/tests/src/Unit/Plugin/views/query/MysqlDateSqlTest.php b/core/modules/views/tests/src/Unit/Plugin/views/query/MysqlDateSqlTest.php
index be5e30d8777ad3eac6f3539aa6e9524ea991505e..bbfc7b638e7b781955662d4a9b043725f4c7712a 100644
--- a/core/modules/views/tests/src/Unit/Plugin/views/query/MysqlDateSqlTest.php
+++ b/core/modules/views/tests/src/Unit/Plugin/views/query/MysqlDateSqlTest.php
@@ -65,7 +65,7 @@ public function providerTestGetDateFormat() {
     return [
       ['foo.field', 'Y-y-M-m', '%Y-%y-%b-%m'],
       ['bar.field', 'n-F D d l', '%c-%M %a %d %W'],
-      ['baz.bar_field', 'j/W/H-h i s A', '%e/%v/%H-%h %i %s %p'],
+      ['baz.bar_field', 'o j/W/H-h i s A', '%x %e/%v/%H-%h %i %s %p'],
     ];
   }