Shahir Ansari
Shahir Ansari

Reputation: 1848

Converting chararray to int in pig?

in Pig Analytics I have a database that has date in 'dd-MMM-YYYY' like 11-Dec-1985.Thats the birthdate.How do i get the age from it?And do some other Operations.Basically after exctracting how do i convert chararray to int type or any other possible way you suggest i can do. Thanks.

Upvotes: 0

Views: 492

Answers (1)

Koji
Koji

Reputation: 409

Can you use pig's ToDate builtin UDF ? http://pig.apache.org/docs/r0.17.0/func.html#to-date

Upvotes: 1

Related Questions