Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
berryandcherry6
Creator II
Creator II

Show Date formate in long Month Names in Qliksense

Hi,

I need to show date in format like December 23rd.

How could i do that?

Regards,

Supriya

1 Solution

Accepted Solutions
Anil_Babu_Samineni

I faced same problem, Recently somewhat i got solve

Date (Square) Problem

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful

View solution in original post

4 Replies
Gysbert_Wassenaar

You can use MMMM in a date format string for the long month names. But the 'st', 'nd', 'rd', 'nth' suffixes you want after the day numbers can't be specified in a format string. You'll have to use an expression to calculate which day number should get which suffix. If you use a master calendar table that you create in the script then you can add those suffixes to that calendar table:

If(Day(MyDate)=1 or Day(MyDate) = 21, or Day(MyDate) = 31, 'st',

     If(Day(MyDate)=2 or Day(MyDate)= 22, 'nd',

          If(Day(MyDate)=3 or Day(MyDate)=23,'rd','th'))) as Suffix


talk is cheap, supply exceeds demand
Anil_Babu_Samineni

I faced same problem, Recently somewhat i got solve

Date (Square) Problem

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
Not applicable

Or you can do the same thing directly in the table.

date(MyDate,'MMMM D') &

if (

     Match(Day(MyDate),1,21,31),

     'st',

     if (

          Match(Day(MyDate),2,22),

          'nd',

          if (

                Match(Day(MyDate),3,23),

                'rd',

                'th'

          )

     )

)

Note - this will turn the field from date format, to a string format. This might cause you some problems with sorting. For this not to happen, make sure you've selected custom sorting with MyDate as the sort order and check sort numerically.

berryandcherry6
Creator II
Creator II
Author

Hi Anil,

Thanks this is what i was looking for, i used below code for my requirement with help of your answer.

Pick((Match(Right(Day(Date(WeekEnd(Today()-7))),1),1,2,3) + Pick(Match(Day(Date(WeekEnd(Today()-7))),11,12,13)+1,0,-1,-2,-3))+1,

Date(WeekEnd(Today()-7),'MMMM DD'  & Chr(7511)&Chr(688)),

Date(WeekEnd(Today()-7),'MMMM DD' & Chr(738)&Chr(7511) ),

Date(WeekEnd(Today()-7),'MMMM DD'  & Chr(8319)&Chr(7496)),

Date(WeekEnd(Today()-7),'MMMM DD' & Chr(691)&Chr(7496)),

)