I have this below query from which I am trying to find out those records that fall between midnight and 2 A.M on 18th September. And *SojTimestampToDate *function will give me date in this format *yyyy/MM/dd HH:mm:ss* * * I am not sure whether the date comparison I did is right or not. And it will give me all those records between midnight and 2 AM.
*SELECT event.app_payload ['n'] AS changed_cguid* * FROM soj_session_container a LATERAL VIEW explode(a.events) t AS event* * WHERE a.dt = '20120918'* * AND SojTimestampToDate(event.event_timestamp) >= '2012/09/18 00:00:00'* * AND SojTimestampToDate(event.event_timestamp) <= '2012/09/18 02:00:00'* Can anyone shed some light on this whether I am doing right or not? *Raihan Jamal*