Hello,
I have a custom query that has this function:
DATE_FORMAT(MAX(T.fecha), '%Y - %b') AS Fecha_ultimo_paciente,
When asking a a question from this table the filter picks it up as text:
Any thoughts?
Hello,
I have a custom query that has this function:
DATE_FORMAT(MAX(T.fecha), '%Y - %b') AS Fecha_ultimo_paciente,
When asking a a question from this table the filter picks it up as text:
Any thoughts?
Hi @rviteri
You mean native query, not custom query, right?
Did that use to work on previous versions?
Which database are you querying?
The way you format the date, it is a string. You would have to convert the string to a date - likely by doing something like this:
STR_TO_DATE(CONCAT(DATE_FORMAT(MAX(T.fecha), '%Y-%m'), '-01'), '%Y-%m-%d') AS Fecha_ultimo_paciente
Hi, yes a Native Query.
A Mysql database is what I am using.
The DATE_FORMAT function has worked in the past.
@rviteri
So I’m guessing the past meaning 0.32.x?
But has %Y - %b
worked - or when you did %Y-%m
or similar more date-like strings?
so this worked MAX(CAST(T.fecha AS DATE)) AS Fecha_ultimo_paciente,
I will try to manuputale the format and will comment