# Extracting the “day of the week” from the date

**URL:** https://community.glideapps.com/t/extracting-the-day-of-the-week-from-the-date/38100
**Category:** Ask for Help
**Created:** [February 4, 2022, 1:48am UTC](https://community.glideapps.com/t/extracting-the-day-of-the-week-from-the-date/38100 "2022-02-04T01:48:03Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![biha](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/biha/32/84110_2.png) [@biha](https://community.glideapps.com/u/biha)
#### Post date: [February 4, 2022, 1:48am UTC](https://community.glideapps.com/t/extracting-the-day-of-the-week-from-the-date/38100/1 "2022-02-04T01:48:03Z")

</div>

Hello, i am using now the Experimental Code from this thread below:

> [@Extracting the "day of the week" from the date](https://community.glideapps.com/t/extracting-the-day-of-the-week-from-the-date/30189/15):
>
> If you’re talking about @gvalero’s code, use the link below in your Experimental Code. I adapted it to my Replit. https://get-weekday-from-time.thinhdinh.repl.co

But turn up Monday for 5 February 2022. Suppose to be Saturday.

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/5/0/50ad57ec3f34a6b9723dfeca0e57347bcf79f5ef.jpeg)

I believe its read as 2 May 2022 instead of 5 February 2022.

---

<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: [February 4, 2022, 2:07am UTC](https://community.glideapps.com/t/extracting-the-day-of-the-week-from-the-date/38100/2 "2022-02-04T02:07:52Z")

</div>

The date plugins are buggy. I don’t recommend using them.

You can get the Weekday name from a date without using any plugins as follows:

- Create a lookup column that lists the days of the week, beginning from Sunday. This column can be anywhere, but I usually have it in a dedicated “Lookup” table

![Screen Shot 2022-02-04 at 10.04.02 AM](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/1/e/1ec428e409bf82fb79376cd9efd8d42827e6809c.png)

- Use a Math column to get the Weekday index number of the date in question: `Weekday(Date)-1`
- Use a Single Value column to take the above index “from start” of your weekday lookup column.

![Screen Shot 2022-02-04 at 10.06.32 AM](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/d/9/d90a0d566db2305756f1e592132a10b00b696601.png)

---

<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: [February 4, 2022, 4:22am UTC](https://community.glideapps.com/t/extracting-the-day-of-the-week-from-the-date/38100/3 "2022-02-04T04:22:03Z")

</div>

> [@Darren\_Murphy](#):
>
> The date plugins are buggy. I don’t recommend using them.

I agree. This puts me in a lot of trouble recently, especially with countries that use dd/mm/yyyy.

---

<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: [February 4, 2022, 4:22am UTC](https://community.glideapps.com/t/extracting-the-day-of-the-week-from-the-date/38100/4 "2022-02-04T04:22:29Z")

</div>

Right!

As @Darren_Murphy wrote, most plugins have bugs working with dates (and if the date format is not US, the problem is worse).

Here my tests playing with some dates

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/0/d/0dea6f1379d66a3443a5de35c4c89f31fc8a6843.png)

Using the Glide’s **JavaScript plugin** , it has serious problems working with days \>12 due to it confuses days with months (DD/MM/YYYY).

Instead, the **Format Date plugin** works perfectly and can be used without problem (so far).

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/0/3/03e898e9cc9c5fb2737bdb76563073dc364f5a0e.png)

Saludos a todos!

---

<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: [February 4, 2022, 4:28am UTC](https://community.glideapps.com/t/extracting-the-day-of-the-week-from-the-date/38100/5 "2022-02-04T04:28:08Z")

</div>

> [@gvalero](#):
>
> Instead, the **Format Date plugin** works perfectly and can be used without problem.

Not sure I’d agree with that. I’ve found the Format Date plugin to be one of the worst of the lot.  
I just don’t trust _any_ of them, and I don’t use them. Mark has said that they will fix them, hopefully soon…

---

<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: [February 4, 2022, 4:32am UTC](https://community.glideapps.com/t/extracting-the-day-of-the-week-from-the-date/38100/6 "2022-02-04T04:32:32Z")

</div>

Well, at least the Format _ **cccc** _ works fine using DD/MM/YYYY format 😜

Bye Darren!

---

<div class="post-metadata">

### Author: ![biha](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/biha/32/84110_2.png) [@biha](https://community.glideapps.com/u/biha)
#### Post date: [February 4, 2022, 5:31am UTC](https://community.glideapps.com/t/extracting-the-day-of-the-week-from-the-date/38100/7 "2022-02-04T05:31:26Z")

</div>

I dont think so.  
I have problem, after i found out it because i am using the cccc one.  
You can see threads below.

> [@Not Tally with the Row Details](https://community.glideapps.com/t/not-tally-with-the-row-details/38101):
>
> Hi, I am not sure what happen but i believe that is the correct row reflection of the view. But the detail of the row not turning up right way. can you tell me why and how to overcome this problem ? eg: normal hour should be 4 , but it turns 8 I also try to put the “Day”. The row should be Saturday but it turn up Monday. You can see “Saturday” (the right answer) in view data button on the right.

and i changed to the Darren’s one, then its works after.

---

<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: [February 4, 2022, 5:47am UTC](https://community.glideapps.com/t/extracting-the-day-of-the-week-from-the-date/38100/8 "2022-02-04T05:47:48Z")

</div>

Well, it’s working for me, maybe an improvement was done days ago and some issues were gone.

I changed my Chrome’s regional settings to US and still works fine ( Format Date plugin):

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

Saludos!

---

<div class="post-metadata">

### Author: ![system](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/system/32/53398_2.png) [@system](https://community.glideapps.com/u/system)
#### Post date: [February 5, 2022, 5:48am UTC](https://community.glideapps.com/t/extracting-the-day-of-the-week-from-the-date/38100/9 "2022-02-05T05:48:25Z")

</div>

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.
