Datetime formatting for day in week

Hi,   I’m working on a project in Studio Pro 8 and needed the number of the day in the week (1-7). I knew this format was easily displayed in a Data Grid DateTime column (when custom format is chosen) so I looked it up that way. There, it is said that ‘E’ gives the number of the day in the week. This should be ‘u’. The functionality is implemented correctly by the standards, but the documentation is wrong at this place.   I haven’t checked if this is mistake is also made in previous versions of Mendix.
3 answers

The error is not in somewhere but in the datagrid widget:

Entering the letter u in the CustomDateFormat field triggers an errormessage showing up ‘invalid format u’, blocking you to get the correct result. And ‘E EE EEE’ gives “Mon Mon Mon”, not "1 01 Mon”.

This is also faulty in 7.20.3 and probably ever since this feature is introduced. You best raise a ticket at and likely they will solve it in several bugfix-releases.


The documentation for the Data Grid widget (and other widgets) is actually correct: the tokens specified in that legend apply to the client-side formatting, which uses the Dojo formatting tokens (where the day-of-week is represented by the token ‘E’). However, the formatting functions in microflows use the Java formatting tokens, which uses ‘u’ for day-of-week.


Hi Jord,

If the documentation is wrong then I think you can make a pull request to the documentation to fix it. Check out this link

In older versions I’ve used ‘u’ with formatedate to get the day of the week as an integer.