GYRE Editor is capable of formatting data before generating the report. There are four methods of formatting data.
Text | default format displays data as is |
Number | manages the display of numeric fields. Allows you to display numeric values as integers or fixed-point, or percent. |
Money | displays numbers with a currency sign or without with the set number of decimal digits. |
Date/Time | lets you choose the right date and time representation. |
Dialog Set Datafield lets you select desired format from the list of prepared formats, or you can enter the format manually.
Formatting rules.
Function | Description | Arguments |
---|---|---|
n | manages mapping of numeric fields |
Example: Format weight data source field as a number with three signs in the fractional part: [[weight||n:3]] Example: Format weight data source field as a number with two characters in the fractional part, using a comma as the separator: [[weight||n:2:,]] |
d | manages the appearance of date and time |
Example: Format the date and time in the form of "01/27/2010 15:30": [[date||d:Y-m-d h:i]] |
m | Financial format |
Example: Format price data source field as a number with two characters in the fractional part and with Euro currency symbol after the price indented one space: [[price||m:-eur:1:2]] |
Code symbols for formatting date and time:
Character in the row format | Description | Examples |
---|---|---|
a | Ante meridiem or Post meridiem lower case | am or pm |
A | Ante meridiem or Post meridiem upper case | AM or PM |
B | Time in Swatch Internet standard | from 000 to 999 |
c |
ISO 8601 (added to PHP 5) |
2004-02-12T15:19:21+00:00 |
d | Day of the month, 2 numbers with leading zeros | from 01 to 31 |
D | Abbreviated name of week days, 3 letters | from Mon to Sun |
F | Fulll month name | from January to December |
g | Hours in 12-hour format without leading zeros | from 1 to 12 |
G | Hours in 24-hour format without leading zeros | from 0 to 23 |
h | Hours in 12-hour format with leading zeros | От 01 до 12 |
H | Hours in 24-hour format with leading zeros | from 00 to 23 |
i | Minutes with leading zeros | from 00 to 59 |
I (capital i) | DST | 1, If the date corresponds to the summer time, or 0 otherwise. |
j | Day of the month without leading zeros | from 1 to 31 |
l (lowercase 'L') | Full name of week day | from Sunday to Saturday |
L | Leap year | 1, if a leap year, otherwise 0. |
m | Serial month number with leading zeros | from 01 to 12 |
M | Abbreviated name of the month, 3 letters | from Jan to Dec |
n | Serial month number without leading zeros | from 1 to 12 |
O | Difference with Greenwich Mean Time in hours | Example: +0200 |
r |
Date in |
Example: Thu, 21 Dec 2000 16:01:07 +0200 |
s | Seconds with leading zeros | from 00 to 59 |
S | Ordinal suffix for day of the month, 2 letters | st, nd, rd or th. Used together with j |
t | Number of days in a month | from 28 to 31 |
T | Server time zone | Examples: EST, MDT ... |
U | Number of seconds since the beginning of The Unix Epoch (The Unix Epoch, January 1, 1970, 00:00:00 GMT) | 581249852 — equivalent of 2 июля 2008 года в 10 ч. 17 м. 32 с. |
w | Week day number | from 0 (Sunday) to 6 (Saturday) |
W | Serial number of the week in the year according to ISO-8601, first day of the week - Monday (added to PHP 4.1.0) | Example: 42 (42nd week of the year) |
Y | Serial number of the year, 4 digits | Examples: 1999, 2003 |
y | Year number, 2 digits | Examples: 99, 03 |
z | The day of the year (starting with 0) | from 0 to 365 |
Z | Timezone offset in seconds. For the time zones west of UTC it is always negative, east of UTC is positive. | from -43200 to 43200 |