# How to change the date format

**URL:** <https://community.glideapps.com/t/how-to-change-the-date-format/77022>\
**Category:** Ask for Help\
**Created:** [October 13, 2024, 7:27am UTC](https://community.glideapps.com/t/how-to-change-the-date-format/77022 "2024-10-13T07:27:36Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![agung\_taufik1](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/agung_taufik1/32/80541_2.png) [@agung\_taufik1](https://community.glideapps.com/u/agung_taufik1)\
**Post date:** [October 13, 2024, 7:27am UTC](https://community.glideapps.com/t/how-to-change-the-date-format/77022/1 "2024-10-13T07:27:36Z")

</div>

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

Hi, I want to filter data based on the date selected by the user. I have already changed the date format to display only the date, but the time still appears. Is there something wrong with the settings?

---

<div class="post-metadata">

**Author:** ![micheal](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/micheal/32/80181_2.png) [@micheal](https://community.glideapps.com/u/micheal)\
**Post date:** [October 13, 2024, 7:41am UTC](https://community.glideapps.com/t/how-to-change-the-date-format/77022/2 "2024-10-13T07:41:03Z")

</div>

On the layout section does the time still show?  
It shouldn’t

Also, I think the reason that is is because the input/form component you used is the Date and time component not the date alone.

---

<div class="post-metadata">

**Author:** ![agung\_taufik1](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/agung_taufik1/32/80541_2.png) [@agung\_taufik1](https://community.glideapps.com/u/agung_taufik1)\
**Post date:** [October 13, 2024, 7:46am UTC](https://community.glideapps.com/t/how-to-change-the-date-format/77022/3 "2024-10-13T07:46:30Z")

</div>

I use only the date

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/2/a/2a100a860a9438fd69c6e58c124d39d7b223bade.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:** [October 13, 2024, 7:47am UTC](https://community.glideapps.com/t/how-to-change-the-date-format/77022/4 "2024-10-13T07:47:51Z")

</div>

The column type is Date & Time. The value _always_ includes a time component, regardless of how it was entered or how you choose to display it.

That said, you should be able to filter against a user-supplied date by using “is within”.

If your filter isn’t working, please show us how you have set it up, and the data.

---

<div class="post-metadata">

**Author:** ![agung\_taufik1](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/agung_taufik1/32/80541_2.png) [@agung\_taufik1](https://community.glideapps.com/u/agung_taufik1)\
**Post date:** [October 13, 2024, 8:40am UTC](https://community.glideapps.com/t/how-to-change-the-date-format/77022/5 "2024-10-13T08:40:01Z")

</div>

hi darren I managed to use “is within” but I have another problem, now I have a start date and an end date, the expected result is that the data that I filter with the start and end dates does not exceed the date I chose, for example I chose the start date 2 October 2024 and the end date is 10 October 2024 with “is within” I can only filter these two dates, the expected result is between these dates following the date I chose.  
To select it I use if then else

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/3/4/340ded3a1abd0e434e445c20c92cc25b6d42a98b.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:** [October 13, 2024, 9:10am UTC](https://community.glideapps.com/t/how-to-change-the-date-format/77022/6 "2024-10-13T09:10:38Z")

</div>

- Add two Single Value columns to your table  
– The first single value column should target the Start Date  
– The second single value column should target the End Date
- This should give you the entered start and end date in every row. You can now compare those against the actual date in each row using an if-then-else column:  
– If Date is before Start Date, then `null` (leave empty)  
– If Date is after End Date, then `null`  
– Else `true`
- Any rows that fall within the two dates will be checked in the if-then-else column

Another approach is to use a Query column. Add it to the same table that captures your Start/End dates, target it at your data table, and apply the following filters:

- Date is on or after This row-\>Start Date
- Date is on or before This row-\>End Date

Then use the Query column as the source of your Chart/Collection.

---

<div class="post-metadata">

**Author:** ![agung\_taufik1](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/agung_taufik1/32/80541_2.png) [@agung\_taufik1](https://community.glideapps.com/u/agung_taufik1)\
**Post date:** [October 13, 2024, 10:24am UTC](https://community.glideapps.com/t/how-to-change-the-date-format/77022/7 "2024-10-13T10:24:36Z")

</div>

![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/f/0/f07ec6f1d53ba6ba7f5cebe39056c8d680a60352.jpeg)  
Hi Darren, I’ve followed your advice, I’m trying to filter October 1 2024 to October 4 2024, but if than else only selects from October 1 to October 3, how can I get the 4th selected?  
 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/0/9/097278d105a0d086e9f75996d02150b911c45be4.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:** [October 13, 2024, 10:33am UTC](https://community.glideapps.com/t/how-to-change-the-date-format/77022/8 "2024-10-13T10:33:56Z")

</div>

Most likely there is a time component in either the End Date or Date columns that is causing this.

This is where I would probably convert all dates to integers and do numerical comparisons instead of date comparisons. This eliminates the time issue.

So for each of your Date, Start Date & End Date add a math column using the following:

```auto
Year(Date)*10^4
+Month(Date)*10^2
+Day(Date)

```

That will give you a number for each something like `20241013`.  
Then use those integer values in your Single Values and if-then-else columns.

---

<div class="post-metadata">

**Author:** ![agung\_taufik1](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/agung_taufik1/32/80541_2.png) [@agung\_taufik1](https://community.glideapps.com/u/agung_taufik1)\
**Post date:** [October 13, 2024, 10:55am UTC](https://community.glideapps.com/t/how-to-change-the-date-format/77022/9 "2024-10-13T10:55:27Z")

</div>

> [@Darren\_Murphy](#):
>
> integer values in your Single Values and if-then-else columns.

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/3/2/32471034d4f657abfa3c166378a9c26ee50d60cd.png)  
I’ve done the math, so now do I have to use “equals”? or other?

---

<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:** [October 13, 2024, 11:06am UTC](https://community.glideapps.com/t/how-to-change-the-date-format/77022/10 "2024-10-13T11:06:48Z")

</div>

- If Date is less than Start Date, then `null`
- If Date is greater than End Date, then `null`
- Else `true`

(referring to the math columns in all cases above)

---

<div class="post-metadata">

**Author:** ![agung\_taufik1](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/agung_taufik1/32/80541_2.png) [@agung\_taufik1](https://community.glideapps.com/u/agung_taufik1)\
**Post date:** [October 13, 2024, 11:42am UTC](https://community.glideapps.com/t/how-to-change-the-date-format/77022/11 "2024-10-13T11:42:39Z")

</div>

Thank you @Darren_Murphy , @micheal  
Thanks to you I have achieved what I hoped for…  
once again thank you very much…

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/c/a/ca999fa155d8018f5353a906692de41da4c1e1b1.jpeg)

---

<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:** [October 20, 2024, 11:42am UTC](https://community.glideapps.com/t/how-to-change-the-date-format/77022/12 "2024-10-20T11:42:55Z")

</div>

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