Skip to content
This is an archived version of the documentation downloaded from LogScale Documentation Archives. Up to date documentation, and documentation for later versions, is available on LogScale Documentation

## Formatting Query Functions

LogScale's formatting functions allow different data types to be formatted and manipulated, either for further processing or make things more human-readable.

Table: Formatting Query Functions

Function | Default Argument | Availability | Description
--- | --- | --- | ---
`default(field, [replaceEmpty], value)` | `value` |  | Creates a field to given parameter and given value.
`format([as], field, format, [timezone])` | `format` |  | Formats a string using printf-style.
`formatDuration([as], field, [from], [precision])` | `field` |  | Formats a duration into a more readable string.
`formatTime(as, [field], format, [locale], [timezone], [unit])` | `format` |  | Formats a string according to `strftime()`.
`json:prettyPrint([as], [field], [step], [strict])` | `field` |  | More readable output to a JSON field.
`lower([as], field, [locale], [type])` | `field` |  | Changes text of a given string field to lower case letters.
`lowercase(field, [include], [locale])` | `field` |  | Changes field name or content to lowercase for parsers.
`upper([as], field, [locale])` | `field` |  | Changes contents of a string field to upper case letters.
`urlDecode([as], field)` | `field` |  | URL-decodes the contents of a string field.
`urlEncode([as], field, [type])` | `field` |  | URL encodes the contents of a string field.
`writeJson([as], [field])` | `field` |  | Writes data, including fields, as a JSON object.

#### Enter search term