How to get penultimate date in a sorted sequence of >1000 dates

Comments

2 comments

  • Alan Mark

    Hi Steve,

    You should be able to use GROUPBOTTOMN to do this.

    Selects the bottom N values from a group. If this function is applied on a date column, bottom N means the N least recent dates.

    So to get the last two dates, you would just use an argument of 2, allowing you to get both the last date and penultimate date in a single go.

    Alan

    1
    Comment actions Permalink
  • Steve Bernstein

    That's good--that'll work, thanks!

    0
    Comment actions Permalink

Please sign in to leave a comment.