hive 时间戳

select from_unixtime(unix_timestamp(accesstime), 'yyyyMMdd') accesstime1,

date('20141113') accesstime2,

date('2014-11-13') accesstime3,

DATE_ADD(DATE('2014-11-13'), 1) a3,

unix_timestamp('20141113', 'yyyyMMdd') a5,

unix_timestamp(DATE_ADD(DATE('2014-11-13'), 1), 'yyyy-MM-dd') a6,

unix_timestamp(accesstime) >= unix_timestamp('20141113', 'yyyyMMdd'),

unix_timestamp(accesstime) < unix_timestamp(DATE_ADD(DATE('2014-11-13'), 1), 'yyyy-MM-dd')

from ods_visit_log 

limit 10

 

你可能感兴趣的:(hive)