Use minof and maxof to find minimum and maximum values of a table field. minof finds the minimum value of a specific field and maxof finds the maximum value of a specific field.
here's the example below.
LedgerTrans ledgerTrans;
select minof(TransDate) from ledgerTrans;
info(strfmt('%1', ledgertrans.TransDate));
select maxof(TransDate) from ledgerTrans;
info(strfmt('%1', ledgertrans.TransDate));
equivalent SQL queries for minimum and maximum date respectively.
select min(transdate) from LedgerTrans
select max(transdate) from LedgerTrans