Impala Add months to current time

0 votes

Hi. I am using Impala to get the current time and then to set an expiry timestamp. I am getting the current time using the select now() query. The expiry should be after two months. So how can I add two months to the current time?

Jun 6, 2019 in Big Data Hadoop by Esha
1,986 views

1 answer to this question.

0 votes

You can add the months using the add_months method as follows:

select now(), add_months(now(), 2);
+-------------------------------+-------------------------------+
| now()                         | add_months(now(), 2)          |
+-------------------------------+-------------------------------+
| 2016-05-31 10:47:00.429109000 | 2016-07-31 10:47:00.429109000 |
+-------------------------------+-------------------------------+
answered Jun 6, 2019 by John

Related Questions In Big Data Hadoop

0 votes
1 answer

How Impala is fast compared to Hive in terms of query response?

Impala provides faster response as it uses MPP(massively ...READ MORE

answered Mar 21, 2018 in Big Data Hadoop by nitinrawat895
• 11,380 points
2,241 views
0 votes
1 answer

How to perform Near-real time analytics using Hadoop?

To perform Near-real time analytics, you have ...READ MORE

answered Apr 24, 2018 in Big Data Hadoop by kurt_cobain
• 9,350 points
821 views
0 votes
1 answer

How to create a project for the first time in Hadoop.?

If you want to learn Hadoop framework ...READ MORE

answered Jul 27, 2018 in Big Data Hadoop by Neha
• 6,300 points
1,173 views
0 votes
1 answer

How to add user in supergroup of hdfs in linux?

Yes , now i have whole idea ...READ MORE

answered Sep 21, 2018 in Big Data Hadoop by Frankie
• 9,830 points
11,198 views
+1 vote
1 answer

Hadoop Mapreduce word count Program

Firstly you need to understand the concept ...READ MORE

answered Mar 16, 2018 in Data Analytics by nitinrawat895
• 11,380 points
11,055 views
0 votes
1 answer

hadoop.mapred vs hadoop.mapreduce?

org.apache.hadoop.mapred is the Old API  org.apache.hadoop.mapreduce is the ...READ MORE

answered Mar 16, 2018 in Data Analytics by nitinrawat895
• 11,380 points
2,558 views
+2 votes
11 answers

hadoop fs -put command?

Hi, You can create one directory in HDFS ...READ MORE

answered Mar 16, 2018 in Big Data Hadoop by nitinrawat895
• 11,380 points
108,970 views
–1 vote
1 answer

Hadoop dfs -ls command?

In your case there is no difference ...READ MORE

answered Mar 16, 2018 in Big Data Hadoop by kurt_cobain
• 9,350 points
4,624 views
0 votes
1 answer

Impala get current time

You can get the current time using ...READ MORE

answered Jun 6, 2019 in Big Data Hadoop by Raman
1,466 views
0 votes
1 answer

How to subtract month from Impala time stamp?

You don't need another method, you can ...READ MORE

answered Jun 6, 2019 in Big Data Hadoop by Tina
3,593 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP