Package org.apache.pig.piggybank.evaluation.datetime.diff

Class Summary
ISODaysBetween ISODaysBetween returns the number of days between two ISO8601 datetimes as a Long Jodatime: http://joda-time.sourceforge.net/ ISO8601 Date Format: http://en.wikipedia.org/wiki/ISO_8601 Example usage: REGISTER /Users/me/commiter/piggybank/java/piggybank.jar ; REGISTER /Users/me/commiter/piggybank/java/lib/joda-time-1.6.jar ; DEFINE ISOYearsBetween org.apache.pig.piggybank.evaluation.datetime.diff.ISOYearsBetween(); DEFINE ISOMonthsBetween org.apache.pig.piggybank.evaluation.datetime.diff.ISOMonthsBetween(); DEFINE ISODaysBetween org.apache.pig.piggybank.evaluation.datetime.diff.ISODaysBetween(); DEFINE ISOHoursBetween org.apache.pig.piggybank.evaluation.datetime.diff.ISOHoursBetween(); DEFINE ISOMinutesBetween org.apache.pig.piggybank.evaluation.datetime.diff.ISOMinutesBetween(); DEFINE ISOSecondsBetween org.apache.pig.piggybank.evaluation.datetime.diff.ISOSecondsBetween(); ISOin = LOAD 'test.tsv' USING PigStorage('\t') AS (dt:chararray, dt2:chararray); DESCRIBE ISOin; ISOin: {dt: chararray,dt2: chararray} DUMP ISOin; (2009-01-07T01:07:01.000Z,2008-02-01T00:00:00.000Z) (2008-02-06T02:06:02.000Z,2008-02-01T00:00:00.000Z) (2007-03-05T03:05:03.000Z,2008-02-01T00:00:00.000Z) ...
ISOHoursBetween ISOHoursBetween returns the number of hours between two ISO8601 datetimes as a Long Jodatime: http://joda-time.sourceforge.net/ ISO8601 Date Format: http://en.wikipedia.org/wiki/ISO_8601 Example usage: REGISTER /Users/me/commiter/piggybank/java/piggybank.jar ; REGISTER /Users/me/commiter/piggybank/java/lib/joda-time-1.6.jar ; DEFINE ISOYearsBetween org.apache.pig.piggybank.evaluation.datetime.diff.ISOYearsBetween(); DEFINE ISOMonthsBetween org.apache.pig.piggybank.evaluation.datetime.diff.ISOMonthsBetween(); DEFINE ISODaysBetween org.apache.pig.piggybank.evaluation.datetime.diff.ISODaysBetween(); DEFINE ISOHoursBetween org.apache.pig.piggybank.evaluation.datetime.diff.ISOHoursBetween(); DEFINE ISOMinutesBetween org.apache.pig.piggybank.evaluation.datetime.diff.ISOMinutesBetween(); DEFINE ISOSecondsBetween org.apache.pig.piggybank.evaluation.datetime.diff.ISOSecondsBetween(); ISOin = LOAD 'test.tsv' USING PigStorage('\t') AS (dt:chararray, dt2:chararray); DESCRIBE ISOin; ISOin: {dt: chararray,dt2: chararray} DUMP ISOin; (2009-01-07T01:07:01.000Z,2008-02-01T00:00:00.000Z) (2008-02-06T02:06:02.000Z,2008-02-01T00:00:00.000Z) (2007-03-05T03:05:03.000Z,2008-02-01T00:00:00.000Z) ...
ISOMinutesBetween ISOMinutesBetween returns the number of minutes between two ISO8601 datetimes as a Long Jodatime: http://joda-time.sourceforge.net/ ISO8601 Date Format: http://en.wikipedia.org/wiki/ISO_8601 Example usage: REGISTER /Users/me/commiter/piggybank/java/piggybank.jar ; REGISTER /Users/me/commiter/piggybank/java/lib/joda-time-1.6.jar ; DEFINE ISOYearsBetween org.apache.pig.piggybank.evaluation.datetime.diff.ISOYearsBetween(); DEFINE ISOMonthsBetween org.apache.pig.piggybank.evaluation.datetime.diff.ISOMonthsBetween(); DEFINE ISODaysBetween org.apache.pig.piggybank.evaluation.datetime.diff.ISODaysBetween(); DEFINE ISOHoursBetween org.apache.pig.piggybank.evaluation.datetime.diff.ISOHoursBetween(); DEFINE ISOMinutesBetween org.apache.pig.piggybank.evaluation.datetime.diff.ISOMinutesBetween(); DEFINE ISOSecondsBetween org.apache.pig.piggybank.evaluation.datetime.diff.ISOSecondsBetween(); ISOin = LOAD 'test.tsv' USING PigStorage('\t') AS (dt:chararray, dt2:chararray); DESCRIBE ISOin; ISOin: {dt: chararray,dt2: chararray} DUMP ISOin; (2009-01-07T01:07:01.000Z,2008-02-01T00:00:00.000Z) (2008-02-06T02:06:02.000Z,2008-02-01T00:00:00.000Z) (2007-03-05T03:05:03.000Z,2008-02-01T00:00:00.000Z) ...
ISOMonthsBetween ISOMonthsBetween returns the number of months between two ISO8601 datetimes as a Long Jodatime: http://joda-time.sourceforge.net/ ISO8601 Date Format: http://en.wikipedia.org/wiki/ISO_8601 Example usage: REGISTER /Users/me/commiter/piggybank/java/piggybank.jar ; REGISTER /Users/me/commiter/piggybank/java/lib/joda-time-1.6.jar ; DEFINE ISOYearsBetween org.apache.pig.piggybank.evaluation.datetime.diff.ISOYearsBetween(); DEFINE ISOMonthsBetween org.apache.pig.piggybank.evaluation.datetime.diff.ISOMonthsBetween(); DEFINE ISODaysBetween org.apache.pig.piggybank.evaluation.datetime.diff.ISODaysBetween(); DEFINE ISOHoursBetween org.apache.pig.piggybank.evaluation.datetime.diff.ISOHoursBetween(); DEFINE ISOMinutesBetween org.apache.pig.piggybank.evaluation.datetime.diff.ISOMinutesBetween(); DEFINE ISOSecondsBetween org.apache.pig.piggybank.evaluation.datetime.diff.ISOSecondsBetween(); ISOin = LOAD 'test.tsv' USING PigStorage('\t') AS (dt:chararray, dt2:chararray); DESCRIBE ISOin; ISOin: {dt: chararray,dt2: chararray} DUMP ISOin; (2009-01-07T01:07:01.000Z,2008-02-01T00:00:00.000Z) (2008-02-06T02:06:02.000Z,2008-02-01T00:00:00.000Z) (2007-03-05T03:05:03.000Z,2008-02-01T00:00:00.000Z) ...
ISOSecondsBetween ISOSecondsBetween returns the number of seconds between two ISO8601 datetimes as a Long Jodatime: http://joda-time.sourceforge.net/ ISO8601 Date Format: http://en.wikipedia.org/wiki/ISO_8601 Example usage: REGISTER /Users/me/commiter/piggybank/java/piggybank.jar ; REGISTER /Users/me/commiter/piggybank/java/lib/joda-time-1.6.jar ; DEFINE ISOYearsBetween org.apache.pig.piggybank.evaluation.datetime.diff.ISOYearsBetween(); DEFINE ISOMonthsBetween org.apache.pig.piggybank.evaluation.datetime.diff.ISOMonthsBetween(); DEFINE ISODaysBetween org.apache.pig.piggybank.evaluation.datetime.diff.ISODaysBetween(); DEFINE ISOHoursBetween org.apache.pig.piggybank.evaluation.datetime.diff.ISOHoursBetween(); DEFINE ISOMinutesBetween org.apache.pig.piggybank.evaluation.datetime.diff.ISOMinutesBetween(); DEFINE ISOSecondsBetween org.apache.pig.piggybank.evaluation.datetime.diff.ISOSecondsBetween(); ISOin = LOAD 'test.tsv' USING PigStorage('\t') AS (dt:chararray, dt2:chararray); DESCRIBE ISOin; ISOin: {dt: chararray,dt2: chararray} DUMP ISOin; (2009-01-07T01:07:01.000Z,2008-02-01T00:00:00.000Z) (2008-02-06T02:06:02.000Z,2008-02-01T00:00:00.000Z) (2007-03-05T03:05:03.000Z,2008-02-01T00:00:00.000Z) ...
ISOYearsBetween  
 



Copyright © ${year} The Apache Software Foundation