Are you using the Format String widget (https://marketplace.mendix.com/link/component/264)? This is deprecated, you can use the normal Text widget for this. Here you can choose how to format you date:
Hope this helps!
In the Datasource > Behavior tab there is a Date Pattern field. What did you add in that?
You have to put a valid dojo/date/locale patterns.
You can find the valid formats here: https://dojotoolkit.org/reference-guide/1.9/dojo/date/locale/format.html