Pull "Max" value from array of DateTime values


Author
Message
Bob Smith
Bob Smith
Forum Guru (69 reputation)Forum Guru (69 reputation)Forum Guru (69 reputation)Forum Guru (69 reputation)Forum Guru (69 reputation)Forum Guru (69 reputation)Forum Guru (69 reputation)Forum Guru (69 reputation)Forum Guru (69 reputation)
Group: Forum Members
Posts: 69, Visits: 1

I have a list of datetimes that are in an array and seem to be "out of order". Attached is a screenshot that shows them in their relative index values (0 through 6)

I need to extract the earliest and latest datetimes so that I can subtract them from one another and calculate the number of months between them. The LAST() value from the array does not always return the latest datetime value. How can I go about doing this?

The MAX() function works only on integer/double values.


Attachments
DateTimeArray.gif (514 views, 5.00 KB)
Reply
Bob Smith
Bob Smith
Forum Guru (69 reputation)Forum Guru (69 reputation)Forum Guru (69 reputation)Forum Guru (69 reputation)Forum Guru (69 reputation)Forum Guru (69 reputation)Forum Guru (69 reputation)Forum Guru (69 reputation)Forum Guru (69 reputation)
Group: Forum Members
Posts: 69, Visits: 1
Thank you for the reply! I will give those functions a try just as soon as I get a moment.

My situation is somewhat unique as I am just using the number of months to scale the size of the chart area. The chart will render with a size of something like 30*number of months. In this case, it doesn't have to be a completely precise value, though seeing a timespan function using the minvar maxvar functions will be very useful in the future!

Thanks again - you guys are always on the ball!
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...





Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search