How to divide hour to minute in mysql?

Member

by lew , in category: MySQL , a year ago

How to divide hour to minute in mysql?

Facebook Twitter LinkedIn Telegram Whatsapp

1 answer

by raphael_tillman , a year ago

@lew 

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

1
2
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.

Related Threads:

How to get last 1 hour to last 10 days data in mysql?
How to query between hours and minute in oracle?
How to use mysql instead of mariadb in symfony 5?
How to count total hour in fastapi?
How to display to the nearest hour in moment.js?
How to show day and hour from timestamp in laravel?