My Python is not particularly good, so I'm afraid I don't understand what that mean
cheers On 9 January 2016 at 14:45, Franc Carter <franc.car...@gmail.com> wrote: > > Hi, > > I'm trying to write a short function that returns the last sunday of the > week of a given date, code below > > def getSunday(day): > > day = day.cast("date") > > sun = next_day(day, "Sunday") > > n = datediff(sun,day) > > if (n == 7): > > return day > > else: > > return sun > > > this gives me > > ValueError: Cannot convert column into bool: > > > Can someone point out what I am doing wrong > > thanks > > > -- > Franc > -- Franc