Putting the Maximum Date into localStorage

I am trying to get the Maximum Date in a Table into localStorage.

I have code below that works but this is for the selected row not the maximum date.

How should this code be modified to get the maximum date?

Mike

replace your reference to the table with this:

Math.max( ...table1.data.map((item) => new Date(item.date2)) )

If you need it human readable:
new Date( Math.max( ...table1.data.map(item => new Date(item.date2)) )).toISOString()

  1. Loop through all table rows
  2. Read the date from the correct column
  3. Convert each date to a Date object

Ferret:

I have eventually got java script that works from Google Genesis. I have no idea about the code but it is writing exactly what I need and I am able to drop it into Retool.

I don’t know who invented java script but I find it a very difficult language.

I am storing my working java script code and I will use it as a template for future applications.

Its all a workaround because I can’t get the Success Event (local host) to work. This feature really needs improvement for developers like me.

Thank you for your answer. I will mark this as the Solution.

Mike