apache pig - Extract day,month,time of the day from date using Pig -


input format : mon, 09/20/10 01:04 pm

have extract day,month,time of day. i'm aware of inbuilt functions getday,getmonth,e.t.c

but im getting following error while using it

could not infer matching function org.apache.pig.b
uiltin.getmonth multiple or none of them fit. please use explicit cast.

even tried getmonth(todate(date))... of no use

simple usage of todate() assumes date string in iso format, yours not. need provide function format string describes date format. see https://pig.apache.org/docs/r0.15.0/func.html#to-date details.

something like

todate(date, 'e, m/d/y k:m a') 

should work.


Comments

Popular posts from this blog

Receive udp packets in android gstreamer -

php - Extract Text from HTTP referer -

matplotlib - PYTHON: Annotate boxes disapear dependant on range -