Hello David,
I'd rather not sort the selection since it's generally already sorted.
But I could do this, although it seems like a lot of overhead compared to
the min/max functions:

Longint array from selection
order by(date field;>)
$Date_min:=date field
Last record
$Date_mix:=date field
create selection from array

Is that something like what you are proposing?
Thanks!
Alan

On Wed, Oct 11, 2017 at 5:47 PM, David Ringsmuth <davidi...@gmail.com>
wrote:

> Alan,
>
>
>
> Sort the selection by the Date field, take the first Date, and then goto
> selected record (table;records in selection(table)), and get that Date.
>
>
>
> This avoids loading much, except the date field sort.
>
>
>
> Hth!
>
>
>
> David Ringsmuth
>
>
>
> *From: *Alan Tilson via 4D_Tech <4d_tech@lists.4d.com>
> *Sent: *Wednesday, October 11, 2017 4:30 PM
> *To: *4D iNug Technical <4d_tech@lists.4d.com>
> *Cc: *Alan Tilson <alantil...@gmail.com>
> *Subject: *Min/Max for Date Fields in 4D
>
>
>
> 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