Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Change format to dimension

Hi,

I have in my dashboard, a straight table with several dimension which are dates in format "DD-MM-YYYY".

I need to show these dates in format "MMM-YY".

How I can do that?

Best Regards

1 Solution

Accepted Solutions
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

Use the date() function to show the dates in the format you need. date(MyDate, 'MMM-YY'). You can do this in the script or in an expression (or a calculated dimension if you want to format a date dimension).


talk is cheap, supply exceeds demand

View solution in original post

6 Replies
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

Use the date() function to show the dates in the format you need. date(MyDate, 'MMM-YY'). You can do this in the script or in an expression (or a calculated dimension if you want to format a date dimension).


talk is cheap, supply exceeds demand
jonathandienst
Partner - Champion III
Partner - Champion III

Hi

In the Document Properties | Number tab, select Date and enter MMM-YY as the format or else use a Date(..., 'MMM-YY') to format the field on loading. This will avoid the need to create a calculated dimension.


HTH

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Nicole-Smith

Does QV already know it's a date?  If it does, you can simply do:

date(YourField, 'MMM-YY')

However, if QV isn't recognizing the field as a date, you must do:

date(date#(YourField,'DD-MM-YYYY'),'MMM-YY')

If you're using a bar chart, or the like, (where you want to see only a single bar for a month), you need to use the monthstart() function around either of the two expressions above in order to only show one (if not, it will show a different bar for each day of the month that you have data):

date(monthstart(YourField), 'MMM-YY')

date(date#(monthstart(YourField),'DD-MM-YYYY'),'MMM-YY')

Not applicable
Author

thanks a lot!!!

Not applicable
Author

thanks a lot!!!

Not applicable
Author

thanks a lot!!!