# Rollup - Latest incorrect

**URL:** <https://community.glideapps.com/t/rollup-latest-incorrect/10114>\
**Category:** Report a Bug\
**Created:** [June 1, 2020, 3:52am UTC](https://community.glideapps.com/t/rollup-latest-incorrect/10114 "2020-06-01T03:52:22Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Spellytics](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/spellytics/32/2770_2.png) [@Spellytics](https://community.glideapps.com/u/Spellytics)\
**Post date:** [June 1, 2020, 3:52am UTC](https://community.glideapps.com/t/rollup-latest-incorrect/10114/1 "2020-06-01T03:52:22Z")

</div>

G’day Glideteam,

I believe there is a bug with the latest rollup function to grab the most recent date in the relation.  
It probably has something to do with the **dd/mm/yyyy** vs **mm/dd/yyyy** format.

My sheet uses the dd/mm/yyyy format.  
Because it’s a more logical format 🙂

When there are two flippable dates (dates that can be interpreted as mm/dd or dd/yy depending on where you live) using the dd/mm/yyyy format =

06/01/2018 (6th Jan 2018) vs 01/06/2018 (1st June 2018), it will pick up 06/01/2018 instead as the latest.

[https://inpfx.glideapp.io/](https://inpfx.glideapp.io/)

---

<div class="post-metadata">

**Author:** ![Jeff\_Hager](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jeff_hager/32/43_2.png) [@Jeff\_Hager](https://community.glideapps.com/u/Jeff_Hager)\
**Post date:** [June 1, 2020, 4:09am UTC](https://community.glideapps.com/t/rollup-latest-incorrect/10114/2 "2020-06-01T04:09:53Z")

</div>

I’m not sure what I should be looking for in your app. Sheet2 only shows the fruit name. Understandably, it’s probably a bug, but your safest bet would be to store dates or display them in yyyy/mm/dd. It might be different in the builder vs the published url too, so that’s something to check.

> [@Glide apps only reading m.d.y date and not d.m.y?](https://community.glideapps.com/t/glide-apps-only-reading-m-d-y-date-and-not-d-m-y/6236/2):
>
> I think I remember Glide saying that for now dates need to be entered in MM/DD/YYYY format. YYYY/MM/DD and ISO should work too. In they future I think they will try to get the region settings from the sheet. Does the date show correctly on a phone? The calendar uses the device’s regional local settings for displaying the date. The same app will show the differently in the US compared to Europe. What region is your browser set to? I would set the date in US, Y/M/D, or ISO in the sheet, the…

---

<div class="post-metadata">

**Author:** ![Spellytics](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/spellytics/32/2770_2.png) [@Spellytics](https://community.glideapps.com/u/Spellytics)\
**Post date:** [June 1, 2020, 6:11am UTC](https://community.glideapps.com/t/rollup-latest-incorrect/10114/3 "2020-06-01T06:11:07Z")

</div>

Ah - apologies, the app view wasn’t showing it correctly.  
I’ve updated it now.

The first tab shows all records and the second tab shows the ‘Latest Records’ that was based on the Relation. Please see Apples and Grapes.

Bananas are to show that it’s correct when it’s not a flippable date.

---

<div class="post-metadata">

**Author:** ![MegannLock](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/megannlock/32/19680_2.png) [@MegannLock](https://community.glideapps.com/u/MegannLock)\
**Post date:** [June 2, 2020, 1:45pm UTC](https://community.glideapps.com/t/rollup-latest-incorrect/10114/4 "2020-06-02T13:45:10Z")

</div>

Maybe try adding a column in your sheet to act as a helper column, format the dates in Glide’s format. Use that as the column to Rollup.

If you’re having an issue with formatting the dates, a more complex workaround would be to use a DATEVALUE formula in that column. You’d then use this column to configure the maximum value for your Rollup column!

Just some alternatives!

---

<div class="post-metadata">

**Author:** ![Robert\_Petitto](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/robert_petitto/32/25193_2.png) [@Robert\_Petitto](https://community.glideapps.com/u/Robert_Petitto)\
**Post date:** [June 2, 2020, 2:49pm UTC](https://community.glideapps.com/t/rollup-latest-incorrect/10114/5 "2020-06-02T14:49:57Z")

</div>

This is a good fix, @MegannLock!

The ONLY caveat to this solution is if you’re looking for instant calculations/comparisons with dates for filtering/visibility purposes. The 5-10 second lag might be a deal breaker. Such was the case with my Meet with Me app.  
[Meet with Me: A Booking App that Prevents Conflicts](https://community.glideapps.com/t/meet-with-me-a-booking-app-that-prevents-conflicts/5916)

---

<div class="post-metadata">

**Author:** ![Spellytics](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/spellytics/32/2770_2.png) [@Spellytics](https://community.glideapps.com/u/Spellytics)\
**Post date:** [June 4, 2020, 11:05am UTC](https://community.glideapps.com/t/rollup-latest-incorrect/10114/6 "2020-06-04T11:05:33Z")

</div>

Thank you for the suggestions!  
Yes, my app needs instant calculations.

My workaround was eventually duplicating the column - one for the calculation and one for labelling.

I still believe this is a bug - since for non-flippable dates (e.g. 31/05/2020) it works correctly no matter how you record it.
