In my database table, I am storing current date and time using NOW()
function. The column type is DATETIME
and it is storing in the format of YYYY-MM-DD HH:MM:SS
.
I am trying to write a query that selects the date and time from my table column and adding HH:MM to retrieved date and time like
SELECT date FROM tablename by adding fetched date which is (YYYY-MM-DD HH:MM:SS) + HH:MM
The above query is just to make you know what I was trying.
Actually I don't know how to add date and time in mysql while retrieving the data.
How can we add YYYY-MM-DD HH:MM:SS
and HH:MM
while retrieving the data in mysql.