I'm searching for a function in Hive, that'll add month to date.
For example :
add_month('2014-01-01',1) -> '2014-02-01'
add_month('2013-12-01',1) -> '2014-01-01'
I'm searching for a function in Hive, that'll add month to date.
For example :
add_month('2014-01-01',1) -> '2014-02-01'
add_month('2013-12-01',1) -> '2014-01-01'
You can create a generic UDF (GenericUDF).
Here is a sample UDF:
Test cases to demonstrate the correctness:
You can use the function like:
Expected output will be:
Just type: