Formula to return the latest date and hour
Hello,
I have a list with exports date and hours and minutes. I need a formula that will allow me to show on the UX, the latest date with hours and minutes. Is there such a formula?
Thanks
Best Answer
-
@ilincach: if I understand correctly, you have a list with multiple elements and in a module you have per every element saved like below?
the idea is to have the format date like "YYYY-MM-DD HH24:MM" in order that you apply an order, all the rows will be correctly ordered (even if the format is TEXT).
The Line-item has the summary setup "Firstnonblank":
and in a system module take the total value that can published in the card.
As you notice the value in SYS00 is not correct: the correct value should be "2024-05-01 14:20", so what it is needed is to order the list descending on the line-item "Date Time Export" in order that the first element to be the latest Export DateTime.
So, after you populate the list and the "DateTime Export" you need to launch the Order List Action in order to put as first element the latest DateTime Export (max).
After launching the Order Action the totals will show correct result:
If you do not want to use the Order List, you could transform the TEXT Date in number like "YYYYMMDDHHMI" and put summary as MAX and transform the MAx number back in text in order to publish it.
Hope it helps,
Alex
2
Answers
-
thanks a lot @alexpavel it work very good!!!! Much appreciated!
0 -
@alexpavel , this action need to be run averytime by someone or in the UX, the card will show the latest export by default with what stated abouve by you?
0 -
This content has been removed.