# 🗓 Month, Day, and Year Math Functions

**URL:** <https://community.glideapps.com/t/month-day-and-year-math-functions/16937>\
**Category:** Ask for Help\
**Created:** [October 9, 2020, 12:12am UTC](https://community.glideapps.com/t/month-day-and-year-math-functions/16937 "2020-10-09T00:12:01Z")\
**Posts on this page:** 8\
**Page:** 3

<div class="post-metadata">

**Author:** ![Ladysh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/ladysh/32/44453_2.png) [@Ladysh](https://community.glideapps.com/u/Ladysh)\
**Post date:** [July 1, 2022, 12:35am UTC](https://community.glideapps.com/t/month-day-and-year-math-functions/16937/41 "2022-07-01T00:35:32Z")

</div>

You will need to calculate [today’s date](https://calendarhours.com/todays-date/) against the first date of the year to find the best pattern, in CalendarHours I found the formula for other formats that are easier and more reliable to use in glide.

---

<div class="post-metadata">

**Author:** ![Joe\_Gabriele](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/joe_gabriele/32/57595_2.png) [@Joe\_Gabriele](https://community.glideapps.com/u/Joe_Gabriele)\
**Post date:** [July 14, 2023, 8:35pm UTC](https://community.glideapps.com/t/month-day-and-year-math-functions/16937/42 "2023-07-14T20:35:12Z")

</div>

Is it possible to take a date, for example 6/14/23, and return the name of the Day (Friday)?

---

<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:** [July 14, 2023, 8:38pm UTC](https://community.glideapps.com/t/month-day-and-year-math-functions/16937/43 "2023-07-14T20:38:27Z")

</div>

The Format Date column would do it, but it’s generally not trusted. I would create a math column to pull out the weekday number, and then use an IF column to convert it into words.

`WEEKDAY(Date)`

@Darren_Murphy has a more robust method involving a separate table listing the days, and then use a single value column with the weekday number as an index value to get the word. Depends on how often you need to do the same thing.

---

<div class="post-metadata">

**Author:** ![Joe\_Gabriele](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/joe_gabriele/32/57595_2.png) [@Joe\_Gabriele](https://community.glideapps.com/u/Joe_Gabriele)\
**Post date:** [July 14, 2023, 8:52pm UTC](https://community.glideapps.com/t/month-day-and-year-math-functions/16937/44 "2023-07-14T20:52:06Z")

</div>

Basically, I have a column called Visit Date and would like to find the day (Friday) they visited so over time I can identify trends (this user typically visits on Fridays).

So essentially I have to build an entire calendar database to be able to index and find the day? Cray. Maybe I can just use OpenAI to have it give me the day name if there is no easy calculation

---

<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:** [July 14, 2023, 9:03pm UTC](https://community.glideapps.com/t/month-day-and-year-math-functions/16937/45 "2023-07-14T21:03:56Z")

</div>

If you use my method, it’s 2 columns in your existing data. A math column and an IF column.

If you use Darren’s method, you need two columns in your existing data. A math column and a single value column, along with a separate table with only 7 rows. One for each day of the week.

If you can trust the plugins, the format date column would work with one column. But it’s generally believed to be unreliable.

---

<div class="post-metadata">

**Author:** ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/96552_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)\
**Post date:** [July 15, 2023, 6:23am UTC](https://community.glideapps.com/t/month-day-and-year-math-functions/16937/46 "2023-07-15T06:23:39Z")

</div>

> [@Joe\_Gabriele](#):
>
> So essentially I have to build an entire calendar database to be able to index and find the day?

No, just one column in one table (any table), with 7 rows. One for each day of the week. I generally create a separate Lookup table for this, along with months of the year.

---

<div class="post-metadata">

**Author:** ![gvalero](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/gvalero/32/1037_2.png) [@gvalero](https://community.glideapps.com/u/gvalero)\
**Post date:** [July 15, 2023, 2:35pm UTC](https://community.glideapps.com/t/month-day-and-year-math-functions/16937/47 "2023-07-15T14:35:40Z")

</div>

> [@Joe\_Gabriele](#):
>
> I have a column called Visit Date and would like to find the day (Friday) they visited so over time I can identify trends (this user typically visits on Fridays).

Hola!

My 2 cents to help with this:

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/2/9/29954339cf3a50769f4e0310e8217d2ff86f2299.png)

```auto
let d = new Date(p1);
const week = ["Sunday","Monday","Tuesday","Wendesday","Thursday","Friday","Saturday"];

if (d.getDay()=="5")
   return week[d.getDay()]

```

Saludos a todos!

---

<div class="post-metadata">

**Author:** ![Joe\_Gabriele](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/joe_gabriele/32/57595_2.png) [@Joe\_Gabriele](https://community.glideapps.com/u/Joe_Gabriele)\
**Post date:** [July 15, 2023, 5:29pm UTC](https://community.glideapps.com/t/month-day-and-year-math-functions/16937/48 "2023-07-15T17:29:46Z")

</div>

Thanks Ill try it!

[Previous page](https://community.glideapps.com/t/month-day-and-year-math-functions/16937.md?page=2)
