Skip to main content
December 17, 2025
Solved

Figure out the least date from the list

  • December 17, 2025
  • 3 replies
  • 0 views

Hi Everyone,

Thanks in advance,

I have list which is having list of dates {1/1/2026; 2/2/2026; 12/31/2025; 11/24/2025}.I needs to identify the least date and Maximum date from the list.

Regards

Divya K

Best answer by vijaym702296

This will help you:- 

a!localVariables(
/* Your list of dates */
local!dateList: {
date(2026, 1, 1),
date(2026, 2, 2),
date(2025, 12, 31),
date(2025, 11, 24)
},

/* Find minimum (earliest) date */
local!minDate: min(local!dateList),

/* Find maximum (latest) date */
local!maxDate: max(local!dateList),

/* Display results */
{
minDateFormatted: text(local!minDate, "YYYY/MM/DD"),
maxDateFormatted: text(local!maxDate, "YYYY/MM/DD")
}
)

3 replies

vijaym702296
December 17, 2025

This will help you:- 

a!localVariables(
/* Your list of dates */
local!dateList: {
date(2026, 1, 1),
date(2026, 2, 2),
date(2025, 12, 31),
date(2025, 11, 24)
},

/* Find minimum (earliest) date */
local!minDate: min(local!dateList),

/* Find maximum (latest) date */
local!maxDate: max(local!dateList),

/* Display results */
{
minDateFormatted: text(local!minDate, "YYYY/MM/DD"),
maxDateFormatted: text(local!maxDate, "YYYY/MM/DD")
}
)

shubhama926776
December 17, 2025

Have a look at it.

a!localVariables(
  local!dates: {
    date(2026, 1, 1),
    date(2026, 2, 2),
    date(2025, 12, 31),
    date(2025, 11, 24)
  },
  {
    minDate: todate(min(local!dates)),
    maxDate: todate(max(local!dates))
  }
)

December 18, 2025

Thank you I tried the same approach it helped me out