Apache PIG: Get the day of the week and split accordingly
问题 I need to split dates between two and ignore saturday and sunday from it. Built in function on 0.11.1 will help to get day of the week but how to find out whether that is saturday or Sunday? Anyone has any idea of it? My expected output described below. Input: User Fromdate Todate Raj 10/3/2013 10/8/2013 James 10/4/2013 10/7/2013 etc.. Expected Output: Raj 10/3/2013 Raj 10/4/2013 Raj 10/7/2013 Raj 10/8/2013 James 10/4/2013 James 10/7/2013 回答1: Since the Pig DateTime objects are really Unix