How do I change the date format displayed in a Date query?

I would like the timestamp in a query to display as “MM/dd/yyyy”, but the default display in Cuba.platform is “dd/MM/yyyy”
I have been able to apply a simple formatter throughout many parts of a project as such:

public class DateFormatterMDY implements Formatter {
public String format(Object value) {
SimpleDateFormat dateFormat = new SimpleDateFormat (“MM/dd/yyyy”);
return value == null ? null : dateFormat.format(value);

However, I’m not finding a way to apply that format inside a query yet. Any tips?


You can change default formats for the whole application using “Project properties > Available locales” dialog. Select your locale, click “Show data format strings” and enter your format in the dateFormat and dateTimeFormat fields. Your formats will be stored in the main message pack of your project as explained here.

1 Like