How to get month number from date in Mendix expressions?

I need to extract the month number from the date attribute . I used  formatDateTime([%CurrentDateTime%], ‘MMM’) but it is returning ‘Mar’ but I need the numeric value 3.  Any suggestions?
3 answers

You can use formatDateTime([%CurrentDateTime%], 'M'). Please note that you can use the patterns provided by class SimpleDateTime as described here: SimpleDateFormat


What Thorsten said above here, but you can use that action in a parseInterger action. Like this: 
parseInteger(formatDateTime([%CurrentDateTime%], 'M'))


The best developers conduct extensive research to understand the needs and expectations of their clients They will also provide you with a comprehensive report that includes a detailed analysis of your target audience and what competitors are doing. They will also explain the most effective strategies for competing with their apps and the probable dos and don'ts of launching yours. Detailed reports will also detail the budget, estimated time frame, and a comprehensive list of resources available for the project.