formatDateTime return english month name as string

0
Hello, I have a question for formatDateTime language setting For my project the language setting is german, but in a special case I want to have the english name of a month like “February”, but the following command is returning me the german name. formatDateTime($DateSelected, 'MMMM') Is it possible to return the english month name specially in a microflow (without changing project language setting)? Thanks in advance
asked
4 answers
2

Create a Java-widget for it that does

String dateInFrench=localDate.format(DateTimeFormatter.ofPattern("EEEE, dd MMMM, yyyy",Locale.GERMAN));

For details see https://www.javabrahman.com/java-8/java-8-how-to-get-day-of-week-month-in-spanish-french-for-any-date-using-locale/

answered
1

Try to use formatDateTime($DateSelected, 'LLLL')

 

See also the documentation https://docs.mendix.com/refguide/parse-and-format-date-function-calls/

 

answered
1

Maik, if language is German, you cannot get an English month name using "LLLL". That wil then give the German month name (Januar).

Vote for: https://forum.mendix.com/link/space/microflows/ideas/2175

 

answered
1

Hi Karsten,

 

As people have mentioned, it is unfortunately not possible by default. You could of course build your own logic for this, where you translate the month to the correct language yourself. Good luck!

 

Regards,

Esther

answered