Forum Discussion

jrodriguez's avatar
jrodriguez
Regular Visitor
10 years ago
Solved

Picking MAX date from 3 date columns

Hey Guys,   Can you help me with the following? I need syntax that gives me the most recent date from 3 different date columns.....something like this:    Opend Date:      Pending Date:      Clos...
  • asocorro's avatar
    10 years ago

    Well, if it's just 3, try this:

     

     

    SWITCH(True(),

    D1 > D2, IF(D1 > D3, D1, D3),

    True(), IF(D2 > D3, D2, D3)
    )

     

    And in case your data is from SQL Server, you can calculate it in the query.  For example: