Format Date/Time & Number
From SimIT Wiki
- PHPJasperXML cannot process complete numbering/date/time format which is pre-define at text field from iReport. What we can do is format the data from SQL statement so that it can display what we want to see.
Native Numbering Format From iReport (Version 0.7 or above)
1. Right click text field and choose your numbering pattern.
2. Warning, wrong pattern or data type can cause your data return as 0!
3. Refer Date_&_numbering_format to know supported pattern
Numbering Format From MYSQL
1. Edit your SQL, use function format to format the number
2. Example
format(value,0,) //remove all decimal value, now thousand separator
format(value,2,',') //Fix 2 decimal point with thousand separator ','
3. To know more: http://dev.mysql.com/doc/refman/5.1/en/string-functions.html#function_format
Date Format
1. Edit your SQL, use function date_format to format your display date
2. Example
date_format(date1,"%Y-%m-%d")
date_format(date1,"%d-%m-%Y")
3. To know more: http://dev.mysql.com/doc/refman/5.1/en/date-and-time-functions.html

