KoolReport's Forum

Official Support Area, Q&As, Discussions, Suggestions and Bug reports.
Forum's Guidelines

Months names in spanish #3261

Open Pedro opened this topic on on Mar 9 - 2 comments

Pedro commented on Mar 9

Incredible product!, congratulations!. i have a query that is "SELECT terminal, DATE_FORMAT(fecha, '%M') as dateyear, ..", etc. How can i get the name of the months in spanish? i tryed "SET lc_time_names = 'es_ES';SELECT terminal, DATE_FORMAT(fecha, '%M') as dateyear, .. but it doesn`t work. thank you for your support. best regards

Pedro commented on Mar 10

Hi, i found out how : you have to add the function for conversion to the field you want to change the language...

            "columns"=>array(
                "dateyear"=>array(
                    "title"=>"Ventas comparativa 3 ultimos aƱos",
                    "label"=>"dateyear",
                  "formatValue"=>function($value){
                        setlocale(LC_TIME, "es_ES");
                        return strftime("%B",strtotime($value));
                    }
                    ), ... etc
Pedro commented on Mar 10

now it works perfectly

Build Your Excellent Data Report

Let KoolReport help you to make great reports. It's free & open-source released under MIT license.

Download KoolReport View demo
solved

None