Invalid date is generated by reporting SQL builder

@mseaton I have a sql cohort query with a date parameter, the date value in the generated sql is in the dd/MM/yyyy format which doesn’t work in mysql, Am I doing something wrong? I’m a little surprised that nobody has ever run into this.

@wyclif, is your date parameter of datatype Date or String? Can you share the snippet of code that you are running that demonstrates this?

The type is Date, it appears like the format set for the reporting.defaultDateFormat GP is what also gets used to serialize the date in the generated sql, because when I set it to the format MySQL uses, it works.

@wyclif, I’ll need to see an example

I have this code that runs a SQL cohort query, the value of the lastExecutionTime parameter which gets set in the query is formatted as dd/MM/yyyy

@wyclif that’s odd - it looks fine and I can’t reproduce what you are seeing. Can you distill this down to a unit test that I can run if I check out your module and see the error first hand?