chrisline90
New member
- Local time
- Today, 17:45
- Joined
- Sep 3, 2024
- Messages
- 5
HI,
I am trying to write a query that includes up to 6 individual dates from a table (or tables) and I want to find the MIN value of all dates in a record, So for example:
The [NextExpiry] would look at the 6 dates and show the MINIMUM of those dates to indicate when the next ‘element’ was due to expire.
I have tried using the IIF function but for up to 6 dates, I can’t find a way to make it work.
Additionally, not all 6 dates are necessarily used. Some records may only have 3 or 4 of the 6 dates, so the query needs to disregard blank fields and just return the MIN date of the dates available in each record.
If anyone can offer advice, I would be very grateful.
I am trying to write a query that includes up to 6 individual dates from a table (or tables) and I want to find the MIN value of all dates in a record, So for example:
The [NextExpiry] would look at the 6 dates and show the MINIMUM of those dates to indicate when the next ‘element’ was due to expire.
I have tried using the IIF function but for up to 6 dates, I can’t find a way to make it work.
Additionally, not all 6 dates are necessarily used. Some records may only have 3 or 4 of the 6 dates, so the query needs to disregard blank fields and just return the MIN date of the dates available in each record.
If anyone can offer advice, I would be very grateful.