Hello,
I’ve just tried the following format string for a few datetime values:
cr> SELECT date_format('%W the %D of %M %Y %H:%i %p', '2021-10-11') as formatted_date_string;
+--------------------------------------------+
| formatted_date_string |
+--------------------------------------------+
| Monday the 11thst of October 2021 00:00 AM |
+--------------------------------------------+
SELECT 1 row in set (0.001 sec)
cr> SELECT date_format('%W the %D of %M %Y %H:%i %p', '2021-10-12') as formatted_date_string;
+---------------------------------------------+
| formatted_date_string |
+---------------------------------------------+
| Tuesday the 12thnd of October 2021 00:00 AM |
+---------------------------------------------+
To me expressions such as “11thst of October” and “12thnd of October” seem wrong.
Is this a bug in CrateDB’s date_format function?