Data Formats and Formatting in YAML
In this article
Views and widgets support various data formats, such as dates, numbers, strings, and others, as well as multiple formatting options for each.
| Formats | Formatting Options |
|---|---|
| DATE | AUTO DD.MM.YY DD.MM.YYYY YY-MM-DD YYYY-MM-DD MM-DD-YY MM-DD-YYYY MM.DD.YY MM.DD.YYYY DD MMM YY DD MMM YYYY DD MMMM YY DD MMMM YYYY DD/MM/YY DD/MM/YYYY MM/DD/YY MM/DD/YYYY MMMM DD, YY MMMM DD, YYYY CUSTOM |
| DATETIME | AUTO DD.MM.YY DD.MM.YY, HH:mm DD.MM.YYYY DD.MM.YYYY, HH:mm YY-MM-DD YYYY-MM-DD, HH:mm YYYY-MM-DD YYYY-MM-DD HH:mm MM-DD-YY MM-DD-YY, hh:mm a MM-DD-YYYY MM-DD-YYYY, hh:mm a MM.DD.YY MM.DD.YY, hh:mm a MM.DD.YYYY MM.DD.YYYY, hh:mm a DD MMM YY DD MMM YY, HH:mm DD MMM YYYY DD MMM YYYY, HH:mm DD MMMM YY DD MMMM YY, HH:mm DD MMMM YYYY DD MMMM YYYY, HH:mm DD/MM/YY DD/MM/YY, HH:mm DD/MM/YYYY DD/MM/YYYY, HH:mm MM/DD/YY MM/DD/YY, hh:mm a MM/DD/YYYY MM/DD/YYYY, hh:mm a MMMM DD, YY MMMM DD, YY, HH:mm MMMM DD, YYYY MMMM DD, YYYY, HH:mm YY YYYY M MM MMM MMMM D DD Do d dd ddd dddd H HH h hh a m mm s ss S SS [text] CUSTOM |
| DAY_OF_WEEK | AUTO DD D DDDD |
| MONTH | AUTO MMM MM MMMM |
| NUMBER | AUTO x #,##x #,##x.x #,##x.xx x[%] x.x[%] zx.xx[%] [$]x CUSTOM |
| DURATION | AUTO d dd ddd h hh hhh m mm mmm s ss sss S SS SSS CUSTOM |
| HOUR | AUTO HH hh a |
| MONTH_YEAR | AUTO MMM, YYYY MMM, YY MM.YYYY MM.YY MMMM YYYY MMMM YY CUSTOM |
| QUARTER | AUTO [Q]q R |
| QUARTER_YEAR | AUTO [Q]q[-]YYYY [Q]q[-]YY R[-]YYYY R[-]YY CUSTOM |
| STRING | — |
| DAY_OF_MONTH | — |
| WEEK | — |
| YEAR | — |
| BOOLEAN | — |
Example of code using automatic formatting:
dimensionsAndMeasures:
- displayCondition:
mode: VARIABLE
variableValue: null
variableName: null
dbDataType: STRING
name: Scenario
format: STRING
type: DIMENSION
value:
mode: FORMULA
formula: '"case_table"."scenario"'
formatting: AUTO
Example of code using manual formatting:
dimensionsAndMeasures:
- formattingTemplate: ""
dbDataType: INTEGER
name: Number of Events
format: NUMBER
type: DIMENSION
value:
mode: FORMULA
formula: process(count("event_log"."event_name"), "case_table"."incident_id")
formatting: "#,##x"
Was the article helpful?
Yes
No