Or still you can use JODA Time API bundled with PIG.
On 27 August 2013 17:15, Ruslan Al-Fakikh wrote:
> Hi,
>
> I think the easiest way would be to use the piggybank converstion functions
> for such tasks:
>
> http://svn.apache.org/viewvc/pig/trunk/contrib/piggybank/java/src/main/java/org/apa
Hi,
I think the easiest way would be to use the piggybank converstion functions
for such tasks:
http://svn.apache.org/viewvc/pig/trunk/contrib/piggybank/java/src/main/java/org/apache/pig/piggybank/evaluation/datetime/convert/
Best Regards,
Ruslan
On Mon, Aug 26, 2013 at 7:43 PM, Serega Sheypak
You can use REGEX_EXTRACT with appropriate pattern and dummy ternary
operator
or
write dummy jython UDF using java/jython classes for Datetime conversion
or
You can convert it to unix seconds using "native pig" and sort as integers:
dataWithSeconds = FOREACH dataWithddMMM GENERATE
Hi,
I have columns defined as string where dates are in the format ddMMM (e.g.
01JAN2009). I would like to sort this column in ascending order. For that, I
need to convert string into date in the format 'ddMMM'.
Please suggest how to do this.
Regards,
Abhishek