From a DATETIME I only want to get the HOUR , I already tried the following and it doesn't work:
SELECT DATEPART(HOUR, notificacion_update) as notificacion_hora, notificacion_msj, notificacion_id, notificacion_status
FROM notificacion
WHERE notificacion_status = 1 ORDER BY notificacion_id LIMIT 10;
The problem is that you are using a Sql Server function when you should use a Mysql function, for this you can consult the following guide , I leave you an example with the use of datediff
what happens with that line I made it obtain the value getdate would be
06/03/2018 15:13:13
according to sql and your pc, so to obtain only the time the convert has a property to convert that date in varchar, the code 108 is a "century" that allows obtaining the time of the date set before, in this case it would be15:13:13
if you want more information look at this link.https://msdn.microsoft.com/en-us/library/ms187928(v=sql.120).aspx#Return Types
You can try with