# Identify the fortnight to which the row belongs

**URL:** <https://community.glideapps.com/t/identify-the-fortnight-to-which-the-row-belongs/61363>\
**Category:** Ask for Help\
**Created:** [May 4, 2023, 7:57pm UTC](https://community.glideapps.com/t/identify-the-fortnight-to-which-the-row-belongs/61363 "2023-05-04T19:57:35Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![mar\_pellarin](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/mar_pellarin/32/55392_2.png) [@mar\_pellarin](https://community.glideapps.com/u/mar_pellarin)\
**Post date:** [May 4, 2023, 7:57pm UTC](https://community.glideapps.com/t/identify-the-fortnight-to-which-the-row-belongs/61363/1 "2023-05-04T19:57:35Z")

</div>

Good afternoon, I ask you for help to do the following:  
I currently have an employee control application with the dates and times of entry and exit. In the database made in Google sheets add a column with this formula =SI(DAY(B2)\<=15;" FIRST ";"SECOND “)&“FIFTNIGHT OF “&TEXT(MONTH(B2);”#0” )&” FROM "&TEXT(B2;“YYYY”)  
Because I need that column to identify which fortnight of which month that row belongs to. But it doesn’t work in the app.  
Can somebody help me? I don’t understand very well the language of Glide

---

<div class="post-metadata">

**Author:** ![Uzo](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/uzo/32/22639_2.png) [@Uzo](https://community.glideapps.com/u/Uzo)\
**Post date:** [May 4, 2023, 10:32pm UTC](https://community.glideapps.com/t/identify-the-fortnight-to-which-the-row-belongs/61363/2 "2023-05-04T22:32:25Z")

</div>

Your formula is wrong… what are you trying to do?  
Try this:  
`=IF(DAY(B2)<=15,"FIRST ","SECOND ")&"FIFTNIGHT OF "&MONTH(B2)&" FROM "&TEXT(B2,"YYYY")`

In Glide, you can use the math column day(date)… month(date)… year(date)… then apply with IF-ELSE column… then use results in the template column

---

<div class="post-metadata">

**Author:** ![Uzo](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/uzo/32/22639_2.png) [@Uzo](https://community.glideapps.com/u/Uzo)\
**Post date:** [May 4, 2023, 11:06pm UTC](https://community.glideapps.com/t/identify-the-fortnight-to-which-the-row-belongs/61363/3 "2023-05-04T23:06:15Z")

</div>

Also, in Glide, you can use an Excel column… pass there this formula:

`IF(DAY(a1)<=15,"FIRST ","SECOND ")&"FIFTNIGHT OF "&MONTH(a1)&" FROM "&year(a1)`

 ![Screen Shot 2023-05-04 at 7.05.56 PM](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/d/4/d4171d6dcc81e3b54c83a604211f49c996d9c94e.jpeg)

---

<div class="post-metadata">

**Author:** ![mar\_pellarin](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/mar_pellarin/32/55392_2.png) [@mar\_pellarin](https://community.glideapps.com/u/mar_pellarin)\
**Post date:** [May 5, 2023, 1:14pm UTC](https://community.glideapps.com/t/identify-the-fortnight-to-which-the-row-belongs/61363/4 "2023-05-05T13:14:58Z")

</div>

Thank you very much for your help. But I think I’m doing something wrong since I apply the excel formula but it doesn’t calculate.

I command example image.

 ![EXAMPLE](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/2/5/2509dd9f95b2246410cd14f3f8397e94acd7309f.png)

---

<div class="post-metadata">

**Author:** ![nathanaelb](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/nathanaelb/32/43079_2.png) [@nathanaelb](https://community.glideapps.com/u/nathanaelb)\
**Post date:** [May 5, 2023, 1:39pm UTC](https://community.glideapps.com/t/identify-the-fortnight-to-which-the-row-belongs/61363/5 "2023-05-05T13:39:55Z")

</div>

Hello, you could try to perform the computation within Glide Tables. Would that be an option?

What are you try to do: you have a list of dates and for each row you would like an output of 1 if the date is between the 1st and 15th of the month and an output of 2 if the date is between the 16th and end of the month?

---

<div class="post-metadata">

**Author:** ![mar\_pellarin](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/mar_pellarin/32/55392_2.png) [@mar\_pellarin](https://community.glideapps.com/u/mar_pellarin)\
**Post date:** [May 5, 2023, 2:10pm UTC](https://community.glideapps.com/t/identify-the-fortnight-to-which-the-row-belongs/61363/6 "2023-05-05T14:10:40Z")

</div>

Sure, that’s right. I have to do the calculation inside the slip tables.  
Now I add an example image made in a spreadsheet so that the format is better understood, this is to be able to filter by fortnight within the application  
 ![EXAMPLE 2](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/5/a/5a1563d2eaa5b75efb3fed987afbd7657f97eda0.png)

---

<div class="post-metadata">

**Author:** ![nathanaelb](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/nathanaelb/32/43079_2.png) [@nathanaelb](https://community.glideapps.com/u/nathanaelb)\
**Post date:** [May 5, 2023, 2:36pm UTC](https://community.glideapps.com/t/identify-the-fortnight-to-which-the-row-belongs/61363/7 "2023-05-05T14:36:39Z")

</div>

Here is an example of how it could be done **in Glide Tables**.

 ![CleanShot 2023-05-05 at 16.29.36](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/b/f/bf8d3e185407a64d035aa1aeba2737864c6973e9.png)

**DAY(Date)**

![CleanShot 2023-05-05 at 16.30.20](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/a/c/ac8e428415746f96fe8ce696750c46817a843531.png)

**DAY(LastDay(month))**

![CleanShot 2023-05-05 at 16.30.48](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/c/3/c33ee609c755af4c1328f00a27c188ebd8fd68c1.png)

**Fortnight**

![CleanShot 2023-05-05 at 16.31.15](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/7/1/71d51a43bf97bb7b8065db925394d06cde31db79.png)

**MONTH(Date) with Luxon**

![CleanShot 2023-05-05 at 16.31.48](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/f/b/fbf352797e5c1813f24fe4240002c657ba274137.png)

**Year(Date)**

![CleanShot 2023-05-05 at 16.32.13](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/7/5/75845c839bd97410fb155d26c938e9267227ea24.png)

**FortnightDisplay**

![CleanShot 2023-05-05 at 16.32.37](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/8/b/8b1c47d4b5501ebdfb21c8bf4aa4bdd60093e258.png)

NB. I didn’t use the column `MONTH(Date) with Math` but I could have by creating a relation from that column to a separate table that would map each month to its number and then pulling in the name of the month with a lookup column.

---

<div class="post-metadata">

**Author:** ![mar\_pellarin](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/mar_pellarin/32/55392_2.png) [@mar\_pellarin](https://community.glideapps.com/u/mar_pellarin)\
**Post date:** [May 5, 2023, 5:30pm UTC](https://community.glideapps.com/t/identify-the-fortnight-to-which-the-row-belongs/61363/8 "2023-05-05T17:30:40Z")

</div>

I’m perfect!! thank you very much for your help.

---

<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:** [May 6, 2023, 5:31pm UTC](https://community.glideapps.com/t/identify-the-fortnight-to-which-the-row-belongs/61363/9 "2023-05-06T17:31:29Z")

</div>

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