Forum Discussion

skodali's avatar
skodali
New Contributor III
5 years ago

Find max date

Hi,

How can we find the max between dates?
I’m trying to find the newly created date between the dates below.

2021-05-19T19:01:47.000+0000
2021-05-19T22:11:26.000+0000

3 Replies

  • Hi,

    In a mapper snap you can use this expression to return the date that is earlier(or equal) if your dates are strings, otherwise if the values are already Dates, you can remove the calls to Date.parse():

    Date.parse($date1) > Date.parse($date2) ? $date2 : $date1

    • skodali's avatar
      skodali
      New Contributor III

      @cjhoward18 Thanks, for your quick response. But those two dates will be in the same column. How can I find the recently created date from the same column?