# Two date fields to get orders

**URL:** <https://community.glideapps.com/t/two-date-fields-to-get-orders/42254>\
**Category:** Ask for Help\
**Created:** [May 23, 2022, 6:16am UTC](https://community.glideapps.com/t/two-date-fields-to-get-orders/42254 "2022-05-23T06:16:04Z")\
**Posts on this page:** 19\
**Page:** 1

<div class="post-metadata">

**Author:** ![Manikandan\_R](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/manikandan_r/32/43482_2.png) [@Manikandan\_R](https://community.glideapps.com/u/Manikandan_R)\
**Post date:** [May 23, 2022, 6:16am UTC](https://community.glideapps.com/t/two-date-fields-to-get-orders/42254/1 "2022-05-23T06:16:04Z")

</div>

Hi

I have two date fields one is date ordered field and another one is future date,both I’m selecting manually.

Now I need to get orders within this date in an line list.

How to do this?

---

<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:** [May 23, 2022, 6:24am UTC](https://community.glideapps.com/t/two-date-fields-to-get-orders/42254/2 "2022-05-23T06:24:22Z")

</div>

Create an if-then-else column:

- If order date is before start date, then false
- If order date is after end date, then false
- Else true

Any rows that have true in that column will have order dates in between your start and end dates.

---

<div class="post-metadata">

**Author:** ![Manikandan\_R](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/manikandan_r/32/43482_2.png) [@Manikandan\_R](https://community.glideapps.com/u/Manikandan_R)\
**Post date:** [May 23, 2022, 6:35am UTC](https://community.glideapps.com/t/two-date-fields-to-get-orders/42254/3 "2022-05-23T06:35:38Z")

</div>

Hi

It’s not working.

---

<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:** [May 23, 2022, 6:35am UTC](https://community.glideapps.com/t/two-date-fields-to-get-orders/42254/4 "2022-05-23T06:35:59Z")

</div>

Screenshot please.

---

<div class="post-metadata">

**Author:** ![Manikandan\_R](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/manikandan_r/32/43482_2.png) [@Manikandan\_R](https://community.glideapps.com/u/Manikandan_R)\
**Post date:** [May 23, 2022, 6:40am UTC](https://community.glideapps.com/t/two-date-fields-to-get-orders/42254/5 "2022-05-23T06:40:20Z")

</div>

Hi,Please check

 ![doubt1](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/7/5/75bcee28f63277f4222e0de335914eeb3c55792b.png)  
 ![doubt2](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/2/3/23a9fab73f89d1b3c7fac64eafc8745a8dc68539.png)  
 ![doubt3.PNG](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/e/3/e3f19b79527a2a0b8b3370dd55f42243c91c2c3e.jpeg)

---

<div class="post-metadata">

**Author:** ![Manikandan\_R](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/manikandan_r/32/43482_2.png) [@Manikandan\_R](https://community.glideapps.com/u/Manikandan_R)\
**Post date:** [May 23, 2022, 6:42am UTC](https://community.glideapps.com/t/two-date-fields-to-get-orders/42254/6 "2022-05-23T06:42:43Z")

</div>

When I change the date as 28,it still showing the orders.

---

<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:** [May 23, 2022, 7:18am UTC](https://community.glideapps.com/t/two-date-fields-to-get-orders/42254/7 "2022-05-23T07:18:00Z")

</div>

In your 3rd screenshot, you have two date picker components, but I can’t see where those values are being written to. Essentially what you need to do is write those values to two user specific columns, and then use two single value columns to apply the selected dates to all rows. You can then use the if-then-else column as I described earlier, comparing your order date to the two single value columns.

---

<div class="post-metadata">

**Author:** ![Manikandan\_R](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/manikandan_r/32/43482_2.png) [@Manikandan\_R](https://community.glideapps.com/u/Manikandan_R)\
**Post date:** [May 23, 2022, 7:22am UTC](https://community.glideapps.com/t/two-date-fields-to-get-orders/42254/8 "2022-05-23T07:22:42Z")

</div>

Yes ,I have created now but not working.whether the two date picker needs to be user specific?

---

<div class="post-metadata">

**Author:** ![Manikandan\_R](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/manikandan_r/32/43482_2.png) [@Manikandan\_R](https://community.glideapps.com/u/Manikandan_R)\
**Post date:** [May 23, 2022, 7:27am UTC](https://community.glideapps.com/t/two-date-fields-to-get-orders/42254/9 "2022-05-23T07:27:22Z")

</div>

![doubt4](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/c/7/c7ed6512921a7c70056665ae966e2b4c82700765.png)  
 ![doubt5](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/c/2/c2063e04e6c40a38d926ab5d526875481a6b9ad6.png)

Am i doing anything wrong in ite column?

---

<div class="post-metadata">

**Author:** ![Manikandan\_R](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/manikandan_r/32/43482_2.png) [@Manikandan\_R](https://community.glideapps.com/u/Manikandan_R)\
**Post date:** [May 23, 2022, 7:33am UTC](https://community.glideapps.com/t/two-date-fields-to-get-orders/42254/10 "2022-05-23T07:33:27Z")

</div>

Now the table updates correctly.Thanks

---

<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:** [May 23, 2022, 7:33am UTC](https://community.glideapps.com/t/two-date-fields-to-get-orders/42254/11 "2022-05-23T07:33:30Z")

</div>

It looks okay.  
In your earlier screen shot, you had 2 records on the 20th, 1 on the 21st and 1 on the 28th.  
None of those are between the 22nd and 27th, so what you see is expected.

What happens if you change your start date to the 20th?

---

<div class="post-metadata">

**Author:** ![Manikandan\_R](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/manikandan_r/32/43482_2.png) [@Manikandan\_R](https://community.glideapps.com/u/Manikandan_R)\
**Post date:** [May 23, 2022, 7:34am UTC](https://community.glideapps.com/t/two-date-fields-to-get-orders/42254/12 "2022-05-23T07:34:37Z")

</div>

But my inline list displays all 4 orders instead of two.

---

<div class="post-metadata">

**Author:** ![Manikandan\_R](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/manikandan_r/32/43482_2.png) [@Manikandan\_R](https://community.glideapps.com/u/Manikandan_R)\
**Post date:** [May 23, 2022, 7:35am UTC](https://community.glideapps.com/t/two-date-fields-to-get-orders/42254/13 "2022-05-23T07:35:45Z")

</div>

Sorry i didn’t filter it.now I did.thank you.

---

<div class="post-metadata">

**Author:** ![Manikandan\_R](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/manikandan_r/32/43482_2.png) [@Manikandan\_R](https://community.glideapps.com/u/Manikandan_R)\
**Post date:** [May 23, 2022, 11:07am UTC](https://community.glideapps.com/t/two-date-fields-to-get-orders/42254/16 "2022-05-23T11:07:37Z")

</div>

Hi Darren,

The one order on 30 th not showing but it should show.

 ![d6](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/c/f/cfc562e31e41a4ae719ca8d67433ec0e75bf6bd2.png)  
 ![d7](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/c/7/c71b6752d522b4e1cf2e9bc5ac36cfe823839874.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:** [May 23, 2022, 11:45am UTC](https://community.glideapps.com/t/two-date-fields-to-get-orders/42254/17 "2022-05-23T11:45:55Z")

</div>

There is probably a time component to the timestamp value that puts it after the end date. Does it return true if you select the 31st as the end date?

---

<div class="post-metadata">

**Author:** ![Manikandan\_R](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/manikandan_r/32/43482_2.png) [@Manikandan\_R](https://community.glideapps.com/u/Manikandan_R)\
**Post date:** [May 23, 2022, 12:38pm UTC](https://community.glideapps.com/t/two-date-fields-to-get-orders/42254/18 "2022-05-23T12:38:21Z")

</div>

yes.its returning true.any solution?

---

<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:** [May 23, 2022, 12:48pm UTC](https://community.glideapps.com/t/two-date-fields-to-get-orders/42254/19 "2022-05-23T12:48:07Z")

</div>

Assuming that you want the Start and End dates to be inclusive, then you could probably just extend the if-then-else. Try the following:

- If Order Date is within Start Date, then true
- If Order Date is within End Date, then true
- If Order Date is before Start Date, then false
- If Order Date is after End Date, then false
- Else true

---

<div class="post-metadata">

**Author:** ![Manikandan\_R](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/manikandan_r/32/43482_2.png) [@Manikandan\_R](https://community.glideapps.com/u/Manikandan_R)\
**Post date:** [May 23, 2022, 1:32pm UTC](https://community.glideapps.com/t/two-date-fields-to-get-orders/42254/20 "2022-05-23T13:32:03Z")

</div>

working perfectly as of now.will double check once tested the app completely.Many Thanks.

---

<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 24, 2022, 1:32pm UTC](https://community.glideapps.com/t/two-date-fields-to-get-orders/42254/21 "2022-05-24T13:32:21Z")

</div>

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