Description
When viewing a MySQL TIME column containing values greater than 23:59:59, MySQL Shell for VS Code displays the following error:
Valid hour range is 0-23
MySQL allows TIME values beyond 23 hours because the type can represent elapsed time. These values are valid and can be queried successfully using the MySQL CLI.
Steps to reproduce
CREATE TABLE time_test (
value TIME
);
INSERT INTO time_test (value)
VALUES ('24:00:00'), ('25:30:00'), ('26:30:00');
SELECT * FROM time_test;
Expected behavior
The result grid displays the stored values:
24:00:00
25:30:00
26:30:00
Actual behavior
The result grid reports:
Valid hour range is 0-23
Workaround
Casting the value to a string displays it correctly:
SELECT CAST(value AS CHAR) AS value
FROM time_test;
Additional context
This commonly occurs with attendance data where times after midnight are represented as extended hours, such as 25:30:00.
Description
When viewing a MySQL
TIMEcolumn containing values greater than23:59:59, MySQL Shell for VS Code displays the following error:MySQL allows
TIMEvalues beyond 23 hours because the type can represent elapsed time. These values are valid and can be queried successfully using the MySQL CLI.Steps to reproduce
Expected behavior
The result grid displays the stored values:
24:00:0025:30:0026:30:00Actual behavior
The result grid reports:
Workaround
Casting the value to a string displays it correctly:
Additional context
This commonly occurs with attendance data where times after midnight are represented as extended hours, such as
25:30:00.