Forum Discussion

AnneMartin's avatar
AnneMartin
Qrew Trainee
2 years ago

Find most recent date in list of dates

I am trying to display the last pay date for each month. The formula querya returns a list of the pay dates in that month, but I am stuck on how to find the highest date in the list.

//FID 8 = pay date
var text myquery= "{8.GTE.'"&[First of Month]&"'} AND {8.LTE.'"&[Last of Month]&"'}";

var text querya= "{GetFieldValues(GetRecords($myquery),8)}";

Max(
ToDate(Part(ToText($querya),1,";")),
ToDate(Part(ToText($querya),2,";")),
ToDate(Part(ToText($querya),3,";")),
ToDate(Part(ToText($querya),4,";")))

------------------------------
Anne Martin
------------------------------

9 Replies

  • MarkShnier__You's avatar
    MarkShnier__You
    Qrew #1 Challenger
    It looks like a great formula.  What's the problem with it.

    ------------------------------
    Mark Shnier (Your Quickbase Coach)
    mark.shnier@gmail.com
    ------------------------------
    • AnneMartin's avatar
      AnneMartin
      Qrew Trainee
      It doesn't return any data, and I don't understand it well enough to break it down to find the glitch.

      ------------------------------
      Anne Martin
      ------------------------------
      • PrashantMaheshw's avatar
        PrashantMaheshw
        Qrew Captain
        is your app using dd-mm-yyyy as date format ?

        ------------------------------
        Prashant Maheshwari
        ------------------------------