> Le 12 oct. 2017 à 18:10, David Adams via 4D_Tech <[email protected]> a > écrit : > > Alan, > > [...] > > * Since you already have a sorted selection, why no use that and SELECTION > RANGE TO ARRAY? So, use SELECTION RANGE TO ARRAY to get a single value from > the first record, that's your min. Then use SELECTION RANGE ARRAY again on > the last record to get the max.
It's a solution if the selection is huge (is it?). But sort selection (I've always found 4d sort is slow), then 2 selection to array, that's 3 server calls, at end. I'd prefer selection to array (1 call), sort array, read first and last items in array. Another good reason to use timestamps encoded in long integer instead of date fields: 4 bytes instead of 8, stores date + hour instead of date only, faster sort, Min/Max works… -- Arnaud de Montard ********************************************************************** 4D Internet Users Group (4D iNUG) FAQ: http://lists.4d.com/faqnug.html Archive: http://lists.4d.com/archives.html Options: http://lists.4d.com/mailman/options/4d_tech Unsub: mailto:[email protected] **********************************************************************

