Data formats used in Web Dashboard

You use data formatting in Web Dashboard to change the appearance of values to be displayed throughout the application, for example, in reports and dashboards.

Valid data types are as follows:

  • numeric
  • date, time, date&time
  • interval
  • image
  • choice

Specify a data format

You specify a data format for a report on a column-by-column basis. To specify a report format:

  1. Open a report and go to the Design tab.
  2. Right click the column in the report for which you want to adjust the data format and select Column properties from the drop-down list.
  3. In the Data format field, enter the format you want to use. See the table below for valid formats for all data types.
  4. Alternatively, click the button next to the Data format field to display a separate dialog box where you can enter information about the column. The options available in this dialog box will depend on the column's data type.

Valid data formats

This section provides information about how to specify a particular data format for a given data type.

Numeric format

To define how to format numeric data, you can create a custom numeric format string consisting of one or more custom numeric specifiers shown in the table below.

Symbol Description
0 Replaces the zero with the corresponding digit if one is present. Otherwise, zero appears in the result string.
# Replaces the "#" symbol with the corresponding digit if one is present. Otherwise, no digit appears in the result string.
. Determines the location of the decimal separator in the result string.
- Minus sign.
, Inserts a localized group separator character between each group.
E Separates mantissa and exponent in scientific notation.
; Defines sections with separate format strings for positive, negative, and zero numbers.
% Multiplies a number by 100 and inserts a localized percentage symbol in the result string.
\u2030 Multiplies by 1000 and show as per mile.
' Used to quote special characters in a prefix or suffix.

Examples

Format Value Country Result
{0,number,#,##0.00}

1234.5678

EN

1,234.57

FR

1.234,57
1234.0000

EN

1,234.00
FR 1.234,00
{0,number, 0.00} 1234.5678 EN/FR 1234.57
1234 EN/FR 1234.00
{0,number,0.##} 1234.5678 EN 1234.57
1234.5000 EN 1234.5
1234.0000 EN 1234
{0,number, 0.00%} 0.253 EN 25.30%
{0,number,0.00} L 1234.5678 EN 1234.57 L
US$ {0,number,0.00} 1234.5678 EN US$ 1234.57
{0,number,0.00} [euro] 1234.5678 EN 1234.57€
{0,number,-#.00} 1234.5678 EN -1234.57
{0, number,#0.0#;(#0.0#)}

1234.5678

EN 1234.57
-1234.5678 EN (1234.57)

Date format

Use this format for date or numeric data. When dates are expressed as numeric data, it is in milliseconds since 1 January 1970.

Symbol Description
G Represents the period or era, such as A.D.
y

"y": The year, from 0 to 99.

"yy": The year, from 00 to 99.

"yyy": The year, with a minimum of three digits.

"yyyy": The year as a four-digit number.

M

"M": The month, from 1 through 12.

"MM": The month, from 01 through 12.

"MMM": The abbreviated name of the month.

"MMMM": The full name of the month.

w Week in year
W Week in month
D Day in year
d Day in month
F Day of week in month
E Abbreviated name of the day in the week in local language (Mon, Tue, and so on)
EEEE Full name of the day in week in local language (Monday, Tuesday, and so on)

Examples

Format Value Country Result
{0}

2010-12-24T08:49:45

EN 12/24/10 8:49 AM

FR

24/12/10 08:49
{0,date} 2010-12-24T08:49:45 EN Dec 24, 2010
FR 24 déc. 2010
{0,date,short} 2010-12-24T08:49:45 EN 12/24/10
FR 24/12/10
{0,date,medium} 2010-12-24T08:49:45 EN Dec 24, 2010

FR

24 déc. 2010
{0,date,long} 2010-12-24T08:49:45 EN December 24, 2010

FR

24 décembre 2010
{0,date,full} 2010-12-24T08:49:45 EN Friday, December 24, 2010

FR

vendredi 24 décembre 2010
{0,date,yyyy-MM-dd HH:mm} 2010-12-24T08:49:45 EN 2010-12-24 08:49

FR

2010-12-24 08:49
{0,date,yy-DDD} 2010-12-24T08:49:45 EN 10-358

FR

10-358
{0,date,’<’w’> ’E} 2010-12-24T08:49:45 EN <51> Fri

FR

<51> Ven

Time format

Use this format on date or numeric data. When time is expressed as numeric data, it is in milliseconds since 1 January 1970.

Symbol Description
a AM/PM
H Hour (0-23)
k Hour (1-24)
K Hour am/pm (0-11)
h Hour am/pm (1-12)
m Minute
s Second
S Millisecond
z Time zone
Z RFC822 Time zone

Examples

Format Value Country Result
{0,time}

2010-12-24T08:49:45

EN 8:49:45 AM

FR

08:49:45
{0,time,HH:mm:ss} 2010-12-24T14:49:45 EN/FR 14:49:45
{0,time,H:mm} 2010-12-24T08:49:45 EN/FR 8:49
{0,time,h:mm:ss a} 2010-12-24T08:49:45 EN/FR 8:49:45 AM
{0,time,H'h 'm'min 's's 'S'ms'} 2010-12-24T08:49:45 EN/FR 8h 49min 45s 0ms

Interval format

Use this format on numeric data. When an interval is expressed as numeric data, it is in milliseconds since 1 January 1970.

Symbol Description
d h:m 'Days' 'Hours':'Minutes'
d h 'Days' 'Hours'
d Days
h:m:s 'Hours':'Minutes':'Seconds'
m:s 'Minutes':'Seconds'
s Seconds
h:m 'Hours':'Minutes'
h Hours am/pm (1-12)
m Minutes

Examples

Format Value Result
{0,interval,h:m:s} 5,270,924 1:27:50
{0,interval,m:s} 5,270,924 87:50
{0,interval,d h:m:s} 5,270,924 0 1:27:50

Choice format

This format is applied to numeric data only. It allows you to attach a format to a range of numbers.

The values should be in a list separated by |. List items should be specified in ascending order. The separator between the value and the label is # for values to be included, and < for values to be excluded ("x#" is less than or equal to x and "x<" is strictly greater than x).

Example:

{0,choice,-1#is negative|0#is zero or fraction|1#is one|1<more than one}

  • if x<=-1, "is negative"
  • if -1<x<=0, "is zero or fraction"
  • if 0<x<=1, "is one"
  • if x>1, "more than one"

Image format

The following items describe how to use the image format:

  • To insert an image in a report, set the format of a column to “[image]”.
  • To display this image, first upload the image in the user’s Theme. For example, name it “uk” and attach a low DPI image to it (uk.png) like a 16x13 px PNG representing the flag of United Kingdom.
  • Create a table report (see Set up reports) into which you have at least one column which has at least one cell with the text “uk”. Using the Column properties, set the format of the column to “[image]”.
  • In the table report, on the specially formatted column, wherever the cell contains exactly the text “uk”, it is replaced by the image uploaded in the theme.
  • In order to visualize the image when executing a report you should restart the server and clear the browser cache after adding or updating the image in the user’s Theme.

Related Links