How to divide hour to minute in mysql?


by lew , in category: MySQL , 6 months ago

How to divide hour to minute in mysql?

Facebook Twitter LinkedIn Telegram Whatsapp

1 answer

by raphael_tillman , 6 months ago


To divide an hour into minutes in MySQL, you can use the following code snippet:

SELECT HOUR(time_column) AS hours, MINUTE(time_column) AS minutes
FROM your_table;

Replace time_column with the actual column name that stores the time data, and your_table with the name of your table.

This query will extract the hour and minute components from the time column and return them as separate columns in the result set.