Our Community is getting an upgrade! To get everything ready for the relaunch, we’ll be placing the site in read-only mode starting September 21st.
We really appreciate your understanding while we get things set up behind the scenes. Catch up on all the exciting details about the move here.
Need help or have questions? Drop us a line at [email protected]
Created on 01-20-2015 08:49 AM - edited 09-16-2022 02:19 AM
Hello,
I need to compare a date with today date so I want to use the function unix_timestamp().
However this function returns one (1970-01-01 00:00:01).
Note:
- The servers date is correctly setted up.
- I use an AWS infrastructure
What else should I check in order to make this function work?
thank you!
Created 01-21-2015 02:26 AM
I guess you mean Impala.
Impala:
select unix_timestamp()
result: 1
Hive:
select unix_timestamp()
result: 1421835925
Created 01-21-2015 02:02 AM
Hi, Alina
You should use the following:
select unix_timestamp(now())
Thanks
Created 01-21-2015 02:18 AM
With the given sintax I get:
error while compiling statement: failed: semanticexception [error 10011]: line 1:22 invalid function 'now'
My query:
select unix_timestamp(now()) from test_kpi_data;
Thank you!
Created 01-21-2015 02:26 AM
I guess you mean Impala.
Impala:
select unix_timestamp()
result: 1
Hive:
select unix_timestamp()
result: 1421835925