Selecionando la hora, minuto y año de una fecha que esta en unix time
SELECT HOUR( FROM_UNIXTIME( cp_time ) ) , MINUTE( FROM_UNIXTIME( cp_time ) ) , YEAR( FROM_UNIXTIME( cp_time ) )
FROM `campaing`
LIMIT 0 , 30
FROM `campaing`
LIMIT 0 , 30
SELECT *
FROM `campaing`
WHERE HOUR( FROM_UNIXTIME( cp_time ) ) =16 and MINUTE( FROM_UNIXTIME( cp_time ) )>=01 and YEAR( FROM_UNIXTIME( cp_time ) )>=2015
FROM `campaing`
WHERE HOUR( FROM_UNIXTIME( cp_time ) ) =16 and MINUTE( FROM_UNIXTIME( cp_time ) )>=01 and YEAR( FROM_UNIXTIME( cp_time ) )>=2015
SELECT FROM_UNIXTIME( cp_time )
FROM `campaing`
WHERE 1
LIMIT 0 , 30
FROM `campaing`
WHERE 1
LIMIT 0 , 30
2015-07-21 00:30:00
2015-08-02 16:02:00
2015-08-02 16:02:00
No hay comentarios:
Publicar un comentario