String autoformatting for dates?

Hi all, I have a string variable with the parameter: '2016-10-05T16:30', representing a date and time in a specific format. However, in the debugger in the variables tab, this string is shown as '10/05/2016 16:30:00'. It seems that the debugger autoformats the string, but why? A string is a string: just some characters. If these characters happen to represent a date i think it should still show the original string.. The weird thing is, if i parse it with 'yyyy-MM-dd''T''HH:mm:ss', it succeeds, so it seems like in the background the string format is still correct. Does anybody know if i there is a setting to stop this autoformatting?
2 answers

I've seen this before too, and I think it could be considered a bug in the debugger (very meta). My gut feeling is that the debugger feeds data to the modeler in JSON, and the modeler is parsing this data. If it sees a date-formatted string, it displays this value as a date. I would suggest you submit this to as a bug.


The most likely answer on your first question is the difference between the date format used by different countries. You can check this by creating a new project in different languages and study how the same date / time value is represented to the user and the Mendix tools. Big chance that you notice that changing the user presentation languages doesn’t change the internal processing format which is used by those debugging tools.

The answer on your second question is therefore most likely to use the change your language setting of your project. Or you accept the different behavior between user presentation and internal processing e.q. how the tooling information is presented.