# Extracting from an array

**URL:** <https://community.glideapps.com/t/extracting-from-an-array/80500>\
**Category:** Ask for Help\
**Created:** [March 4, 2025, 9:41pm UTC](https://community.glideapps.com/t/extracting-from-an-array/80500 "2025-03-04T21:41:29Z")\
**Posts on this page:** 1\
**Showing post:** 8

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [March 5, 2025, 11:27pm UTC](https://community.glideapps.com/t/extracting-from-an-array/80500/8 "2025-03-05T23:27:33Z")

</div>

Ok here’s my proposed solution.

 ![CleanShot 2025-03-06 at 06.25.29](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/f/5/f517ec7572efea51d585bddf55d4f0358c91c5f6.png)

From the array, use this to get the array length.

 ![CleanShot 2025-03-06 at 06.25.38](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/a/5/a5f73f114e200a1d1f794c57705d2f30bf07aada.png)

Use this to calculate the date difference between the start date and now: `TRUNC(N-D)`

 ![CleanShot 2025-03-06 at 06.25.58](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/1/3/13a953d4fb12c7a45cae8c7df968c33f08ffe54f.png)

Use this to calculate the index of the “current day”: `MAX(MOD(D,C),0)`

 ![CleanShot 2025-03-06 at 06.26.28](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/8/b/8b0909ee33a694b39a48595e31d6f56c3842d473.png)

And finally this to get the number of the day via the index.

 ![CleanShot 2025-03-06 at 06.26.50](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/d/f/df4b1a107cedf188dfc032184fae610431ac04b6.png)

---

_[View the full topic](https://community.glideapps.com/t/extracting-from-an-array/80500)._
