# Show next 7 dates after a specific starting date (YC?)

**URL:** <https://community.glideapps.com/t/show-next-7-dates-after-a-specific-starting-date-yc/32135>\
**Category:** Ask for Help\
**Created:** [September 22, 2021, 10:49am UTC](https://community.glideapps.com/t/show-next-7-dates-after-a-specific-starting-date-yc/32135 "2021-09-22T10:49:39Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![kyleheney](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/kyleheney/32/41173_2.png) [@kyleheney](https://community.glideapps.com/u/kyleheney)\
**Post date:** [September 22, 2021, 10:49am UTC](https://community.glideapps.com/t/show-next-7-dates-after-a-specific-starting-date-yc/32135/1 "2021-09-22T10:49:39Z")

</div>

Hi,

@Darren_Murphy noted this a little while ago, but it seems as though the Math column and date calculations aren’t working great — you can’t force the date format when performing a calculation.

I have a date column (Single Value) and a number column (0-7). I use this in another app and it works well — I have a Math column that adds the number to the date, which then returns the first date followed by the next 6 dates (so a full week of dates). This trick was given to me by @Jeff_Hager

Now though, that approach isn’t working because the Math column is forcing the result to be a number and not a date. I’ve tried all sorts of ways to force the date format but it’s not working. It does still work in my original app though!

I’m wondering if there’s a way to use the Experimental Code column achieve the same result. The goal is to have a column of 7 dates, where the first date is known/provided by a single value and the next 6 dates are the ones after this given date.

Thanks for any help!

---

<div class="post-metadata">

**Author:** ![SantiagoPerez](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/santiagoperez/32/16807_2.png) [@SantiagoPerez](https://community.glideapps.com/u/SantiagoPerez)\
**Post date:** [September 22, 2021, 11:42am UTC](https://community.glideapps.com/t/show-next-7-dates-after-a-specific-starting-date-yc/32135/2 "2021-09-22T11:42:32Z")

</div>

Hola @kyleheney

@Manu.n helped me out with a column that gives me an array of dates between two dates. He may be able to help with this case.

---

<div class="post-metadata">

**Author:** ![Manu.n](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/manu.n/32/11679_2.png) [@Manu.n](https://community.glideapps.com/u/Manu.n)\
**Post date:** [September 22, 2021, 11:46am UTC](https://community.glideapps.com/t/show-next-7-dates-after-a-specific-starting-date-yc/32135/3 "2021-09-22T11:46:53Z")

</div>

Hello friends  
yes it is possible in YC (even if I am surprised that the Math function does not return a date with the calculation !!)  
the returns in return, you need an array just one string with separator ‘,’ ???

---

<div class="post-metadata">

**Author:** ![Manu.n](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/manu.n/32/11679_2.png) [@Manu.n](https://community.glideapps.com/u/Manu.n)\
**Post date:** [September 22, 2021, 11:55am UTC](https://community.glideapps.com/t/show-next-7-dates-after-a-specific-starting-date-yc/32135/4 "2021-09-22T11:55:03Z")

</div>

this is YC

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/6/7/67d28fbbd4cd3ea8b92af40769e2213dbe9ae194.png)

YC Link  
[https://Date1toNext.manun2.repl.co](https://Date1toNext.manun2.repl.co)

YC Source

> **[Date1toNext](https://replit.com/@ManuN2/Date1toNext?v=1)**
>
> TEST

the format will depend on the language of your browser (with me it’s French so dd / mm / yyyy) but if you are in us normally the format will be mm / dd / yyyy !!

in this YC, only the date is returned, but it is possible to return date & time !!!

---

<div class="post-metadata">

**Author:** ![kyleheney](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/kyleheney/32/41173_2.png) [@kyleheney](https://community.glideapps.com/u/kyleheney)\
**Post date:** [September 22, 2021, 12:34pm UTC](https://community.glideapps.com/t/show-next-7-dates-after-a-specific-starting-date-yc/32135/5 "2021-09-22T12:34:07Z")

</div>

Hi @Manu.n !

Thanks for the help. My goal is to get a single column with one date per row — like this:

Single Value. Dates  
September 1, 2021. September 1, 2021  
September 2,2021  
September 3, 2021  
And so on til September 8

Edit: I’ll clean this up when I get to my computer. Didn’t format well through mobile.

---

<div class="post-metadata">

**Author:** ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)\
**Post date:** [September 22, 2021, 12:41pm UTC](https://community.glideapps.com/t/show-next-7-dates-after-a-specific-starting-date-yc/32135/6 "2021-09-22T12:41:36Z")

</div>

I just tried as you described, and it seems to work fine?

 ![Screen Shot 2021-09-22 at 8.40.33 PM](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/e/f/ef1aa18e45d80e356d197141bd7943d210d0dc89.png)

---

<div class="post-metadata">

**Author:** ![Manu.n](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/manu.n/32/11679_2.png) [@Manu.n](https://community.glideapps.com/u/Manu.n)\
**Post date:** [September 22, 2021, 12:42pm UTC](https://community.glideapps.com/t/show-next-7-dates-after-a-specific-starting-date-yc/32135/7 "2021-09-22T12:42:22Z")

</div>

I add 2 parameters  
a short, medium, long format  
a separator between dates

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/f/c/fc638851bc37f481067338f0440b2226d1c26e58.png)

---

<div class="post-metadata">

**Author:** ![kyleheney](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/kyleheney/32/41173_2.png) [@kyleheney](https://community.glideapps.com/u/kyleheney)\
**Post date:** [September 22, 2021, 12:45pm UTC](https://community.glideapps.com/t/show-next-7-dates-after-a-specific-starting-date-yc/32135/8 "2021-09-22T12:45:59Z")

</div>

WTH! Let me rearrange my columns and see if it works… the only difference I can see is that your SV is before your Number column.

---

<div class="post-metadata">

**Author:** ![kyleheney](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/kyleheney/32/41173_2.png) [@kyleheney](https://community.glideapps.com/u/kyleheney)\
**Post date:** [September 22, 2021, 12:46pm UTC](https://community.glideapps.com/t/show-next-7-dates-after-a-specific-starting-date-yc/32135/9 "2021-09-22T12:46:38Z")

</div>

The result I’m looking for is exactly what @Darren_Murphy showed above.

---

<div class="post-metadata">

**Author:** ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)\
**Post date:** [September 22, 2021, 12:50pm UTC](https://community.glideapps.com/t/show-next-7-dates-after-a-specific-starting-date-yc/32135/10 "2021-09-22T12:50:14Z")

</div>

haha, if column ordering makes a difference then we have a [serious problem, Houston](https://en.wikipedia.org/wiki/Houston,_we_have_a_problem) 🤣

---

<div class="post-metadata">

**Author:** ![kyleheney](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/kyleheney/32/41173_2.png) [@kyleheney](https://community.glideapps.com/u/kyleheney)\
**Post date:** [September 22, 2021, 12:51pm UTC](https://community.glideapps.com/t/show-next-7-dates-after-a-specific-starting-date-yc/32135/11 "2021-09-22T12:51:54Z")

</div>

Okay it’s working now… and I found my error. I converted my original date to a text using a template column and my Single Value was pulling from that template column instead of the original date column. I changed it to look at the original date and it’s working.

Appreciate the efforts, but I think this one was just my brain cramp issue!

---

<div class="post-metadata">

**Author:** ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)\
**Post date:** [September 22, 2021, 12:54pm UTC](https://community.glideapps.com/t/show-next-7-dates-after-a-specific-starting-date-yc/32135/12 "2021-09-22T12:54:20Z")

</div>

That would do it (and I can relate) 😆

---

<div class="post-metadata">

**Author:** ![BlakeWS](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/blakews/32/24377_2.png) [@BlakeWS](https://community.glideapps.com/u/BlakeWS)\
**Post date:** [September 22, 2021, 11:13pm UTC](https://community.glideapps.com/t/show-next-7-dates-after-a-specific-starting-date-yc/32135/13 "2021-09-22T23:13:06Z")

</div>

When you’re writing to the Increment column, are you writing each number value shown in one set of actions? I’ve tried this in the actions and the cells don’t get written sequentially, the 2 and 4 will be transposed, for example. I even tried to add a “go back” action between to try to ensure one cell is finished writing before the next write step starts to process.

---

<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:** [September 22, 2021, 11:20pm UTC](https://community.glideapps.com/t/show-next-7-dates-after-a-specific-starting-date-yc/32135/14 "2021-09-22T23:20:33Z")

</div>

The actions may complete too fast and jump on top of each other, I had this behaviour when trying to mass upload data to Glide Tables using add row actions, but in my case the order was not so important.

---

<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:** [September 23, 2021, 12:23am UTC](https://community.glideapps.com/t/show-next-7-dates-after-a-specific-starting-date-yc/32135/15 "2021-09-23T00:23:24Z")

</div>

You only update the first row. The increment is pre-populated on all of the other rows. I call these work tables. You pre-populate all of the rows you need, then something like a single value column pulls in the dynamic value and the whole table calculates based on that dynamic single value.

That’s what I did here. One small table dynamically adapts to show an endless number of months.

> [@Generating & displaying a monthly shift roster](https://community.glideapps.com/t/generating-displaying-a-monthly-shift-roster/21708/20):
>
> Check out what I have so far. All of it is in the ‘Month Layout’ glide table and tab. The other tab and sheets are from another thing I was working on awhile back. The entire month layout sheet builds the calendar. It only uses 37 rows and allows paging through all months, so it adapts dynamically. It’s a little quirky at the moment until you click a button first to initially set the increment value. Then it works fine after that. I have it set to highlight the current day and there is CS…

---

<div class="post-metadata">

**Author:** ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)\
**Post date:** [September 23, 2021, 2:16am UTC](https://community.glideapps.com/t/show-next-7-dates-after-a-specific-starting-date-yc/32135/16 "2021-09-23T02:16:16Z")

</div>

> [@BlakeWS](#):
>
> When you’re writing to the Increment column, are you writing each number value shown in one set of actions?

What Jeff said. ⬆  
I find myself using “working” tables more and more these days. I find them particularly useful for dashboard type screens.  
I blame Jeff for this.

---

<div class="post-metadata">

**Author:** ![BlakeWS](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/blakews/32/24377_2.png) [@BlakeWS](https://community.glideapps.com/u/BlakeWS)\
**Post date:** [September 23, 2021, 2:16am UTC](https://community.glideapps.com/t/show-next-7-dates-after-a-specific-starting-date-yc/32135/17 "2021-09-23T02:16:30Z")

</div>

Very neat, I’m checking out the backend now. Thanks!

---

<div class="post-metadata">

**Author:** ![BlakeWS](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/blakews/32/24377_2.png) [@BlakeWS](https://community.glideapps.com/u/BlakeWS)\
**Post date:** [September 23, 2021, 2:20am UTC](https://community.glideapps.com/t/show-next-7-dates-after-a-specific-starting-date-yc/32135/18 "2021-09-23T02:20:52Z")

</div>

I suppose I do the same, to try to avoid as many custom actions as possible. Custom actions are too hidden for my liking.

---

<div class="post-metadata">

**Author:** ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)\
**Post date:** [September 23, 2021, 2:25am UTC](https://community.glideapps.com/t/show-next-7-dates-after-a-specific-starting-date-yc/32135/19 "2021-09-23T02:25:13Z")

</div>

> [@BlakeWS](#):
>
> Very neat, I’m checking out the backend now. Thanks!

The roster that Jeff helped me build in that thread is still working, several months later.  
Monthly shift rosters for roughly 500 employees are managed outside the app, and syncronised with the app several times a day. It’s been a brilliant solution and I rarely have to touch it. It just works.

---

<div class="post-metadata">

**Author:** ![NoCodeAndy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/nocodeandy/32/62530_2.png) [@NoCodeAndy](https://community.glideapps.com/u/NoCodeAndy)\
**Post date:** [January 17, 2024, 4:50pm UTC](https://community.glideapps.com/t/show-next-7-dates-after-a-specific-starting-date-yc/32135/20 "2024-01-17T16:50:23Z")

</div>


