# Calculating Last Date from 2 dates

**URL:** <https://community.glideapps.com/t/calculating-last-date-from-2-dates/46147>\
**Category:** Ask for Help\
**Created:** [August 7, 2022, 1:31pm UTC](https://community.glideapps.com/t/calculating-last-date-from-2-dates/46147 "2022-08-07T13:31:06Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![ichilddev](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/ichilddev/32/45179_2.png) [@ichilddev](https://community.glideapps.com/u/ichilddev)\
**Post date:** [August 7, 2022, 1:31pm UTC](https://community.glideapps.com/t/calculating-last-date-from-2-dates/46147/1 "2022-08-07T13:31:06Z")

</div>

Hi hi

I need to calculate the last date of the Probation Period from a Final Start Date in which:

1. Final Start Date will be the Latter of Scheduled Start Date and Actual Start Date (whichever is later), and I have use the If-Else to check. See Show Final Start Date is a If Else Formula.jpg

2. I would like to find the Probation Last Date by getting the Final Start Date + Probation Period (in days).

Issue:

- When i use the Math method using Final Start Date (If Else Then) + Probation period (in days), there is no results.

- However if i use the Maths method using Schedule Start Date (a date field) + Probation period (in days), there is a rightly result.

Kind advise the best approach.

 ![Snapshots](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/3/d/3d7fa197b5aaa69bf76d0d105e1a0810f2dd5264.jpeg)

---

<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:** [August 7, 2022, 1:53pm UTC](https://community.glideapps.com/t/calculating-last-date-from-2-dates/46147/2 "2022-08-07T13:53:54Z")

</div>

Works for me.

 ![Screen Shot 2022-08-07 at 9.50.25 PM](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/a/a/aa384e7df7e7c5487ee6e6ddf3547bbe01e1d7a8.png)

 ![Screen Shot 2022-08-07 at 9.49.44 PM](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/9/6/96227a7b54100e2a0b82fd0ee5cd5db85568bd51.png)

 ![Screen Shot 2022-08-07 at 9.49.31 PM](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/c/3/c399a511692fc798114316057279cfc75e66282e.png)

 ![Screen Shot 2022-08-07 at 9.50.18 PM](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/b/d/bd25e9e9e9530291cbb5580e830abca1aa6a34b4.png)

I notice that you’re using an if-then-else column for your probation period. Are you sure that always returns a number?

---

<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:** [August 8, 2022, 12:11am UTC](https://community.glideapps.com/t/calculating-last-date-from-2-dates/46147/3 "2022-08-08T00:11:29Z")

</div>

> [@Darren\_Murphy](#):
>
> Are you sure that always returns a number?

Guess this was a case that the author did not give a value for the “else” branch. That might mess things up when doing a calculation in the math column.

---

<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:** [August 8, 2022, 12:35am UTC](https://community.glideapps.com/t/calculating-last-date-from-2-dates/46147/4 "2022-08-08T00:35:29Z")

</div>

mmm, that’s the only thing that occurred to me. Either that, or maybe the Actual Start Date isn’t a “true” date/time column. If it’s coming from a Google Sheet, that could be a possibility. Although, the fact that “is after” is available in the if-then-else suggests that it’s okay… 🤷‍♂️

---

<div class="post-metadata">

**Author:** ![ichilddev](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/ichilddev/32/45179_2.png) [@ichilddev](https://community.glideapps.com/u/ichilddev)\
**Post date:** [August 8, 2022, 2:31am UTC](https://community.glideapps.com/t/calculating-last-date-from-2-dates/46147/5 "2022-08-08T02:31:20Z")

</div>

Hi hi thanks for your quick response!

Probation will always have a value. See this.

 ![Probation with Value](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/8/a/8a6c27a642191089203d3868636deb4e801c9127.jpeg)

---

<div class="post-metadata">

**Author:** ![ichilddev](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/ichilddev/32/45179_2.png) [@ichilddev](https://community.glideapps.com/u/ichilddev)\
**Post date:** [August 8, 2022, 2:33am UTC](https://community.glideapps.com/t/calculating-last-date-from-2-dates/46147/6 "2022-08-08T02:33:27Z")

</div>

HI hi

Similarly, the final start date will always show the date as the user will need to key in a date for the schedule start date. See this screenshot.

 ![final start date is always with a date value](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/4/7/47b68abb2307059177dfcee20bd7471204394ada.jpeg)

I have checked again. My side still showing nothing when use show\_Final Start Date.

---

<div class="post-metadata">

**Author:** ![ichilddev](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/ichilddev/32/45179_2.png) [@ichilddev](https://community.glideapps.com/u/ichilddev)\
**Post date:** [August 8, 2022, 2:35am UTC](https://community.glideapps.com/t/calculating-last-date-from-2-dates/46147/7 "2022-08-08T02:35:37Z")

</div>

Hi hi

Actual Start date is a Date in Glidetable

 ![Actual Start Date is in glidetable](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/e/f/ef2ea8c2c0761853148f22995c033164deb664ca.jpeg)

---

<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:** [August 8, 2022, 2:36am UTC](https://community.glideapps.com/t/calculating-last-date-from-2-dates/46147/8 "2022-08-08T02:36:36Z")

</div>

Can you try removing the extra line in the “90” value to see if it makes a difference?

---

<div class="post-metadata">

**Author:** ![ichilddev](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/ichilddev/32/45179_2.png) [@ichilddev](https://community.glideapps.com/u/ichilddev)\
**Post date:** [August 8, 2022, 3:02am UTC](https://community.glideapps.com/t/calculating-last-date-from-2-dates/46147/9 "2022-08-08T03:02:15Z")

</div>

@Darren_Murphy I have constructed the same as yours.

@ThinhDinh Remove 90.

 ![Constructed the same scenario](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/a/0/a0c7835eecbad3ed2e77f3411c251fcf7a81969b.jpeg)

---

<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:** [August 8, 2022, 4:25am UTC](https://community.glideapps.com/t/calculating-last-date-from-2-dates/46147/10 "2022-08-08T04:25:50Z")

</div>

May we know what type of browser are you using, and what format are you using for your “scheduled start date” column in your Google Sheets?

I assume it’s the same “1 Sep 22” we’re seeing?

Does it work if you click on the arrow button on the right of the column name?

---

<div class="post-metadata">

**Author:** ![ichilddev](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/ichilddev/32/45179_2.png) [@ichilddev](https://community.glideapps.com/u/ichilddev)\
**Post date:** [August 8, 2022, 4:32am UTC](https://community.glideapps.com/t/calculating-last-date-from-2-dates/46147/11 "2022-08-08T04:32:27Z")

</div>

Hi

I am using CHrome browser in windows.

Will it matter if i have update the Actual Start date from a New screen instead of the generic Edit Screen

 ![update data from open new screen](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/a/e/ae3da1d791b64bf67b964719e99400942a6d89a2.jpeg)

---

<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:** [August 8, 2022, 4:34am UTC](https://community.glideapps.com/t/calculating-last-date-from-2-dates/46147/12 "2022-08-08T04:34:52Z")

</div>

It doesn’t matter. I was just wondering what format is it writing under the hood, whether you manually input it or is it a Glide component. Seems like it’s just the date component writing to that column?

---

<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:** [August 8, 2022, 4:39am UTC](https://community.glideapps.com/t/calculating-last-date-from-2-dates/46147/13 "2022-08-08T04:39:35Z")

</div>

Are there any other columns that handle those dates that we aren’t seeing?  
Specifically - do you use any of the date related [plugin columns](https://www.glideapps.com/plugins) anywhere?

---

<div class="post-metadata">

**Author:** ![ichilddev](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/ichilddev/32/45179_2.png) [@ichilddev](https://community.glideapps.com/u/ichilddev)\
**Post date:** [August 8, 2022, 4:45am UTC](https://community.glideapps.com/t/calculating-last-date-from-2-dates/46147/14 "2022-08-08T04:45:29Z")

</div>

Using the Glide component Date Picker

 ![Start Work using Date Picker](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/5/5/5586a4701a53bfdbff055adf26360f423f4e1ff9.jpeg)

---

<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:** [August 8, 2022, 4:53am UTC](https://community.glideapps.com/t/calculating-last-date-from-2-dates/46147/15 "2022-08-08T04:53:31Z")

</div>

Okay, I just noticed something. In your if-then-else column that determines the “final start” date, it looks like Glide sees the result as a number rather than a date. You can tell this because it’s asking you to set a number precision rather than a date format. See below…

 ![Screen Shot 2022-08-08 at 12.50.31 PM](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/8/7/87b5a3ed5fb4e60ec208140f0f6c0c1ad7ee92b1.jpeg)

I don’t know why this is, but I think it’s a clue…

---

<div class="post-metadata">

**Author:** ![ichilddev](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/ichilddev/32/45179_2.png) [@ichilddev](https://community.glideapps.com/u/ichilddev)\
**Post date:** [August 8, 2022, 4:56am UTC](https://community.glideapps.com/t/calculating-last-date-from-2-dates/46147/16 "2022-08-08T04:56:44Z")

</div>

Hi

No. not using any plugin actually. Purely Google sheet and glidetables. I am still a novice in this 🤣

Just resort to using google sheet arrayformula on this 😂

 ![Using Google Sheet Arrayformula to Sort ou the Final Date](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/1/4/145dca21c2fcbeb80d90e6e5ad20e4c3c58e17a7.png)

---

<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:** [August 8, 2022, 4:58am UTC](https://community.glideapps.com/t/calculating-last-date-from-2-dates/46147/17 "2022-08-08T04:58:31Z")

</div>

Would you be prepared to give me temporary access to your team so that I can take a look?

If that’s okay, send me a private message with the team invite link (you can get that from the team members list on your dashboard).

---

<div class="post-metadata">

**Author:** ![ichilddev](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/ichilddev/32/45179_2.png) [@ichilddev](https://community.glideapps.com/u/ichilddev)\
**Post date:** [August 8, 2022, 5:02am UTC](https://community.glideapps.com/t/calculating-last-date-from-2-dates/46147/18 "2022-08-08T05:02:57Z")

</div>

Hi hi

 ![Precision Adjusted](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/b/9/b944c6c7989754a7cefacf532548eb36090105ee.jpeg)

Have to choose of the value. SO i choose 1. Still the same.

---

<div class="post-metadata">

**Author:** ![ichilddev](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/ichilddev/32/45179_2.png) [@ichilddev](https://community.glideapps.com/u/ichilddev)\
**Post date:** [August 8, 2022, 5:03am UTC](https://community.glideapps.com/t/calculating-last-date-from-2-dates/46147/19 "2022-08-08T05:03:19Z")

</div>

Sure! Let me insert you. Pm

---

<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:** [August 8, 2022, 5:22am UTC](https://community.glideapps.com/t/calculating-last-date-from-2-dates/46147/20 "2022-08-08T05:22:53Z")

</div>

> [@ichilddev](#):
>
> Have to choose of the value. SO i choose 1. Still the same.

Yeah, my point is that the fact that it’s asking to to set the precision means that the result is a number. But it should be a date. My gut feeling is that there is something wrong with your Actual Start Date column. Try changing the format of that column and then save it again. Set it to date and time, or long date format, or anything different to what it is now. See if that changes anything.

[Next page](https://community.glideapps.com/t/calculating-last-date-from-2-dates/46147.md?page=2)
