Alan,

I haven't followed this thread closely, so apologies if I say something
silly.

* Is it important to optimize this operation past the sensible solution
you've already tried?

* 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.

I can't think of anything else better. You would have to test it out to see
if the double call is even worth the trouble.

On Wed, Oct 11, 2017 at 11:30 AM, Alan Tilson via 4D_Tech <
4d_tech@lists.4d.com> wrote:

> Greetings everyone,
>
> Is there a way to get the earliest and latest dates from a selection of
> records similar to using Min/Max for numerical data?
>
> I have sorted the data and captured the first and last dates but this seems
> rather a lot of work to get this info.
>
> I believe that I have also used Selection To Array to capture the dates in
> the array and then sorted the array.
>
> Surely there is something I've overlooked?
>
> Currently using v13.6.
>
> Thanks,
> Alan Tilson
> **********************************************************************
> 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:4d_tech-unsubscr...@lists.4d.com
> **********************************************************************
**********************************************************************
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:4d_tech-unsubscr...@lists.4d.com
**********************************************************************

Reply via email to