Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

DATE FORMAT

Hi,

I have a date in number format like '200101'

but i need to display 'Jan-01' format in list box.

can any one help how can i do this???

8 Replies
brenner_martina
Partner - Specialist II
Partner - Specialist II

Hi,

if your field is no datefield you have to use:

Date(Makedate(Left(Field,4),Right(Field,2),1),'MMM-YY')

otherwise you can directly enter: Date(Field,'MMM-YY')

Not applicable
Author

Thanks for the quick reply

Date(Makedate(Left(Field,4),Right(Field,2),1),'MMM-YY') this condition works for me.

it's giving the correct result that what i want but records are not in order.

how can i sort this list box????

regards,

mahesh

Not applicable
Author

Hi Mahesh,

Did you tried the Sort-> Expression by adding this expression ?

Regards,

Srinivasan.R

Not applicable
Author

Hi Srinivasan,

I tried with Expression sorting but no luck.

But i just checked numeric value sorting and its works fine.

Thanks for the help. 🙂

Not applicable
Author

Hi Friends,

i have one more requiremrnt here.

i have list of month values in a list box but i whant to display only latest 6 months in lis box.

for this i have created variable like 'max(month)-5' with the name 'latestmonth' and used this variable in expression in list box

if (Month>=atestmonth, Month)

here Month is the field i have in my input source.

this conditons is giving the latest latest 6 months in my list box.

but the problem is when i select some value in the list box other values are displaying in the list box .

like when i select some vale in list box then dynamicaly updating with other values.

but i want only latest 6 month and i want to select for that list .

Can any one help me please its very urjent.

Regards,

Mahesh

Not applicable
Author

Hi,

I think you can try use monthname() function by edit the field name of date.

Like monthname(OrderDate)

Regards.

brenner_martina
Partner - Specialist II
Partner - Specialist II

Hi,

using expressions in List- or Multiboxes can not be sorted! (info from QT-Support). Thats why you have to put the expression in the script and show in the listbox allways only the field, then you can change sortorder and/or number format settings.

for the last 6 month you can create an extra calender with Month(Today())-6 to Month(Today())!

Not applicable
Author

Thanks for the info

i ill try this.