Format Cheatsheet
This is a very quick cheatsheet for all the different formats that you get out of AL using the Format()
function with various format options.
I’ve recently been trying to again find the format that returns the GUID value without the curly braces, and as I didn’t want to test all the options again, I finally created this cheatsheet for myself. Maybe it will be useful for you as well.
Format 8 was omitted from this table as it produces no meaningful formatting for any data type.
Click on any cell to expand and see the full value.
Note:
Values marked with an asterisk (*) are language dependent and to make that obvious, I left them in Spanish.
Data Type | Format 0 | Format 1 | Format 2 | Format 3 | Format 4 | Format 5 | Format 6 | Format 7 | Format 9 |
---|---|---|---|---|---|---|---|---|---|
DateTime | 10/07/25 02:30 PM | 10/07/25 02:30:52 PM | 10/07/25 02:30 PM | 10/07/25 02:30:52 PM | N/A | N/A | N/A | N/A | 2025-10-07T11:30:52Z |
Date | 10/07/2025 | 10/07/2025 | 100725D | 25/10/07 | *Octubre 7, 2025 | 100725 | 251007 | *Oct 7, 2025 | 07/10/2025 |
Time | 2:30:52 PM | 2:30:52 PM | 143052T | N/A | N/A | N/A | N/A | N/A | 14:30:52 |
Guid | {FDBEA7C4-9205-4A3A-998E-D7B020529BC1} | {FDBEA7C4-9205-4A3A-998E-D7B020529BC1} | {FDBEA7C4-9205-4A3A-998E-D7B020529BC1} | FDBEA7C492054A3A998ED7B020529BC1 | FDBEA7C4-9205-4A3A-998E-D7B020529BC1 | (FDBEA7C4-9205-4A3A-998E-D7B020529BC1) | {0XFDBEA7C4,0X9205,0X4A3A,{0X99,0X8E,0XD7,0XB0,0X20,0X52,0X9B,0XC1}} | N/A | {FDBEA7C4-9205-4A3A-998E-D7B020529BC1} |
Decimal | 1,234,567.89 | 1234567.89 | 1234567.89 | 1,234,567.89 | 1234567.89 | N/A | N/A | N/A | 1234567.89 |
Boolean | *Sí | *Sí | 1 | N/A | N/A | N/A | N/A | N/A | TRUE |
Option | *Pedido abierto | *Pedido abierto | 1 | N/A | N/A | N/A | N/A | N/A | 1 |
Enum | *Pedido abierto | *Pedido abierto | 1 | N/A | N/A | N/A | N/A | N/A | 1 |
Duration | *1 hora 1 minuto 1 segundo | *1 hora 1 minuto 1 segundo | 1 2 1 4 1 6 | N/A | N/A | N/A | N/A | N/A | P0DT1H1M1.0S |
RecordId | Frmt. Tst. Tbl.: 1 | Format Test Table: 1 | Frmt. Tst. Tbl.: 1 | N/A | N/A | N/A | N/A | N/A | [MyCompany.Tables."Frmt. Tst. Tbl."]: 1 |
DateFormula | *1T+2D | *1T+2D | <1Q+2D> | N/A | N/A | N/A | N/A | N/A | 1Q+2D |