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

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

get numerical representation of month from month()


month( '1971-10-30' ) returns Oct

How do I get 10 which represents October.

3 Replies
jonathandienst
Partner - Champion III
Partner - Champion III

Hi

Use Num(month( '1971-10-30' )), or if it is in a table, set the format to integer.

HTH

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Not applicable
Author

When you use the month function, the underlying result is a dual, so has the text representation of 'Oct', if you adjust the format for your field to number, this will display 10.

or you can wrap num around it, if required in the script.

Num(month( '1971-10-30' ))

hope that helps

Joe

Not applicable
Author

Use Num(month( '1971-10-30' ))

- Lalit