How to format date but sort as normal date

Hi,

I have been struggling with sorting and grouping a DATE column after formatting it and perhaps thereโ€™s a workaround for it, I just need to find the right way to do it.

Let me explain:

  • I have a DATE column that is saved with the regular formatting โ€œ12/31/2020โ€ which I can group by or sort as I wishโ€ฆ

  • Then, I created a DATE FORMATED virtual column so it looks like this โ€œThursday, December 31st, 2020โ€

So my problem is, if I wanted to group by ASC or DESC the DATE FORMATTED column, it doesnโ€™t quite work the same as the regular date format.

How can I group by DATE FORMATTED so I can see it but keep the DATE order?

Any suggestions and help are going to be appreciated,

Thanks.

PSD.
If you were wondering how I formatted the date here it is:

CONCATENATE(
SWITCH(WEEKDAY([DATE]),
1, Sunday,
2, Monday,
3, Tuesday,
4, Wednesday,
5, Thursday,
6, Friday,
7, Saturday,
โ€œInvalid date!โ€),
", ",
SWITCH(MONTH([DATE]),
1, January,
2, February,
3, March,
4, April,
5, May,
6, June,
7, July,
8, August,
9, September,
10, October,
11, November,
12, December,
โ€œInvalid date!โ€),
" ",
CONCATENATE(
DAY([DATE]),
IF(
IN(
DAY([DATE]),
LIST(11, 12, 13)
),
โ€œthโ€,
SWITCH(
RIGHT(DAY([DATE]), 1),
โ€œ1โ€, โ€œstโ€,
โ€œ2โ€, โ€œndโ€,
โ€œ3โ€, โ€œrdโ€,
โ€œthโ€
)
)
),
", ",
YEAR([DATE])
)

Solved Solved
0 2 868
1 ACCEPTED SOLUTION

Thank you, I knew there was a way to format it like that, I just hadnโ€™t found the right article.

Now, that simplifies the formatting process but I know it wonโ€™t solve the sorting problem using it on the โ€œData Validation > Valid Ifโ€ or the โ€œAuto Compute > App Formulaโ€ Sections because they would just convert the value to text.

Thereโ€™s another solution I hadnโ€™t notice before, and Iโ€™m pretty ok with leaving it like this for nowโ€ฆ On the โ€œType Detailsโ€ section, I turned on the toggle that says โ€œUse long date formatโ€ the result is Dec 12, 2020, and THIS SORTS AND GROUPS AS EXPECTEDโ€ฆ

Anyways, eventually, I would like to know how to format and sort like my question just to have more control of it but for now, Iโ€™m happy with this.

Thank you for your feedback, time and support.

View solution in original post

2 REPLIES 2

Below expression might serve the same with much shorter way

TEXT([Date],"DDDD, MMMM D, YYYY")

Thank you, I knew there was a way to format it like that, I just hadnโ€™t found the right article.

Now, that simplifies the formatting process but I know it wonโ€™t solve the sorting problem using it on the โ€œData Validation > Valid Ifโ€ or the โ€œAuto Compute > App Formulaโ€ Sections because they would just convert the value to text.

Thereโ€™s another solution I hadnโ€™t notice before, and Iโ€™m pretty ok with leaving it like this for nowโ€ฆ On the โ€œType Detailsโ€ section, I turned on the toggle that says โ€œUse long date formatโ€ the result is Dec 12, 2020, and THIS SORTS AND GROUPS AS EXPECTEDโ€ฆ

Anyways, eventually, I would like to know how to format and sort like my question just to have more control of it but for now, Iโ€™m happy with this.

Thank you for your feedback, time and support.

Top Labels in this Space