starrocks icon indicating copy to clipboard operation
starrocks copied to clipboard

from_unixtime function return error results when using different format

Open zhangyifan27 opened this issue 4 months ago • 2 comments

Steps to reproduce the behavior (Required)

select from_unixtime(1727193600, 'yyyy-MM-dd HH:mm');

Expected behavior (Required)

select from_unixtime(1727193600, '%Y-%m-%d %H:%i');
+---------------------------------------------+
| from_unixtime(1727193600, '%Y-%m-%d %H:%i') |
+---------------------------------------------+
| 2024-09-25 00:00                            |
+---------------------------------------------+

Real behavior (Required)

select from_unixtime(1727193600, 'yyyy-MM-dd HH:mm');
+-----------------------------------------------+
| from_unixtime(1727193600, 'yyyy-MM-dd HH:mm') |
+-----------------------------------------------+
| yyyy-MM-dd HH:mm                              |
+-----------------------------------------------+

StarRocks version (Required)

  • You can get the StarRocks version by executing SQL select current_version()

3.3

zhangyifan27 avatar Oct 21 '24 08:10 zhangyifan27