If you are just using it in a query, you can do this:
date_sub(FROM_UNIXTIME(UNIX_TIMESTAMP(),'yyyy-MM-dd') , 1)

I generally do my date calculations in a shell script and pass them in with a 
hiveconf variable.

Carla

-----Original Message-----
From: ext Yue Guan [mailto:pipeha...@gmail.com] 
Sent: Monday, August 06, 2012 15:00
To: user@hive.apache.org
Subject: Re: (Get the current date -1) in Hive

guess you can use sub_date, but you have to get today by some outside script.

On 08/06/2012 02:10 PM, Techy Teck wrote:
> Is there any way to get the current date -1 in Hive means yesterdays 
> date always?
>
>
>

Reply via email to