You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pig.apache.org by "Earl Cahill (JIRA)" <ji...@apache.org> on 2008/10/08 09:57:44 UTC
[jira] Updated: (PIG-476) given a date that can match a
SimpleDateFormat want to be able to extract arbitrary SimpleDateFormat
data, like day or year
[ https://issues.apache.org/jira/browse/PIG-476?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Earl Cahill updated PIG-476:
----------------------------
Attachment: DateExtractor-PIG-476
patch contains
org.apache.pig.piggybank.evaluation.util.apachelogparser.DateExtractor
org.apache.pig.piggybank.test.evaluation.util.apachelogparser.TestDateExtractor
> given a date that can match a SimpleDateFormat want to be able to extract arbitrary SimpleDateFormat data, like day or year
> ---------------------------------------------------------------------------------------------------------------------------
>
> Key: PIG-476
> URL: https://issues.apache.org/jira/browse/PIG-476
> Project: Pig
> Issue Type: New Feature
> Reporter: Earl Cahill
> Attachments: DateExtractor-PIG-476
>
>
> Want to be able to do something like
> A = FOREACH raw GENERATE org.apache.pig.piggybank.evaluation.util.apachelogparser.DateExtractor(dayTime, "yyyy", "dd/MMM/yyyy:HH:mm:ss");
> to extract the year, or if your date is formatted as
> dd/MMM/yyyy:HH:mm:ss Z
> you could do something like
> A = FOREACH raw GENERATE org.apache.pig.piggybank.evaluation.util.apachelogparser.DateExtractor(dayTime, "MM-dd-yyyy");
> to grab out the day
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.