Format

Not available in this language yet.
Not available in this language yet.
Format( "format", arg, ... )
Format( "format", Arr(arg, ...) )
Format( "format", arg, ... )
Format( "format", [ arg, ... ] )
Not available in this language yet.
Not available in this language yet.
Format( "format", arg, ... )
Format( "format", Arr(arg, ...) )
Not available in this language yet.

Description

The Format function applies the format argument to compose a string by converting the remaining arguments to strings. Format is very similar to the printf() function that is available in many languages.

The format argument is a string that includes format specifiers that define how arguments should be converted to strings.

format should contain as many format specifiers as there are remaining arguments. format can include fewer format specifiers than remaining arguments, but an errors occurs when more format specifiers are included than remaining arguments.

If an argument cannot be formatted according to format, an error is returned.

Parameters

Argument Type Definition and Requirements

format

String

The format to apply to following arguments. See the Format section for details.

arguments

Array, or list of arguments.

The arguments to format.

Returns

A string value representing the formatted arguments, or an error if any format conversion fails.

Format

The format parameter is a string that contains format specifiers. Each format specifier defines how a function argument is to be converted into a string. Format specifiers use the following syntax:

%[index][flags][width][.precision]conversion[suffix]
  • The optional index specification is a positive decimal integer (>= 1) that indicates the relative position of the argument to format from the argument list. format, as the first function argument, has a zero offset in the argument list. The next argument has an offset of 1, followed by 2, and so on.

  • The optional flags specification is a set of characters that modify the output format. The set of valid flags depends on the conversion. See Flags for details.

  • The optional width specification is a positive decimal integer indicating the minimum number of characters to be included in the output for this conversion.

  • The optional precision specification is a non-negative decimal integer that is usually used to restrict the number of characters produced for this conversion. The specific behavior depends on the conversion.

  • The required conversion specification is a character that indicates how the associated argument is to be formatted when it is converted to a string. The set of valid conversions for a given argument depends on the argument’s data type. See Conversions for details.

  • The optional suffix specification is a character that indicates which time or date field to use for timestamp conversions. See Suffixes for dates, Suffixes for times, or Suffixes for dates and times for details.

Flags

Flag Description

-

The result is left-justified.

+

The result always includes a sign, positive or negative.

 (space)

The result includes a leading space for positive values.

0

The result is zero padded.

(

The result encloses negative numbers in parentheses.

Conversions

Conversion Description

%d

The result is formatted as a decimal integer.

%x

The result is formatted as a hexadecimal integer.

%X

The result is formatted as a hexadecimal integer. All letters are converted to uppercase.

%o

The result is formatted as an octal integer.

%f

The result is formatted as a decimal number.

%e

The result is formatted as a number using scientific notation.

%E

The result is formatted as a number using scientific notation. All letters are converted to uppercase.

%g

The result is formatted as a number using scientific notation, or a decimal number, depending on the precision.

%G

The result is formatted as a number using scientific notation, or a decimal number, depending on the precision. All letters are converted to uppercase.

%s

The result is formatted as string. If the argument is null, the "null" string is returned.

%S

The result is formatted as string. If the argument is null, the "null" string should be returned. All letters are converted to uppercase.

%t

The result is formatted as Date/Time in ISO-8601 format. An optional suffix can be included to select a specific date or time field for formatting.

%b

The result is formatted as boolean.

%B

The result is formatted as boolean. All letters are converted to uppercase.

%%

The literal character % (percent sign).

%n

The system-specific line break.

%@

The result is formatted as the FaunaDB wire protocol. (This is a debug conversion which applies to all non-scalar values)

Suffixes for dates

The following are suffixes for the %t conversion that are used to format specific date fields:

Suffix Description

B

The full month name, e.g. January.

b

The abbreviated month name, e.g. Jan.

h

The same as the b suffix.

A

The full name of the day of the week, e.g. Monday.

a

The abbreviated name of the day of the week, e.g. Mon.

C

The year divided by 100 (the century), formatted as 2 digits with leading zeroes as necessary, e.g. 00-99.

Y

The year, formatted as 4 digits with leading zeroes as necessary, in the range 0000-9999.

y

The last two digits of the year, formatted with leading zeroes as necessary, in the range 00-99.

j

The day of the year, formatted as 3 digits with leading zeroes as necessary, in the range 001-366.

m

The month, formatted as 2 digits with a leading zero as necessary, in the range 01-13 (13 is required for lunar calendars).

d

The day of the month, formatted as 2 digits with a leading zero as necessary, in the range 01-31.

e

The day of month, formatted as 2 characters with a leading space as necessary, in the range 1-31.

D

The date, formatted as %tm/%td/%ty, e.g. 08/16/2019.

F

The date formatted as %tY-%tm-%td, e.g. 2019-08-16.

Suffixes for times

The following are suffixes for the %t conversion that are used to format specific time fields:

Suffix Description

H

The hour, formatted as 2 digits with leading zeroes as necessary, in the range 00-23.

I

The hour, formatted as 2 digits with a leading zero as necessary, in the range 01-12.

k

The hour, formatted as 1 or 2 digits, in the range 0-23.

l

The hour, formatted as 1 or 2 digits, in the range 1-12.

M

The minute, formatted as 2 digits with leading zeroes as necessary, in the range 00-59.

S

The second, formatted as 2 digits with leading zeroes as necessary, in the range 00-60.

L

The millisecond within the second, formatted as 3 digits with leading zeroes as necessary, in the range 000-999.

N

The nanosecond within the second, formatted as 9 digits with leading zeroes as necessary, in the range 000000000-999999999.

p

The morning or afternoon marker, am or pm (AM or PM with the T conversion).

s

The seconds since epoch (1970-01-01T00:00:00+00:00).

Q

The milliseconds since epoch (1970-01-01T00:00:00.000+00:00).

Suffixes for dates and times

The following are suffixes for the %t conversion that are used to format common date+time compositions:

Suffix Description

R

The time as %tH:%tM, e.g. 18:51.

T

The time as %tH:%tM:%tS, e.g. 18:51:33.

r

The time as %tI:%tM:%tS %Tp, e.g. 06:51:33 PM.

D

The date as %tm/%td/%ty, e.g. 08/16/19.

F

The date as ` %tY-%tm-%td`, e.g. 2019-08-16.

c

The date and time as %ta %tb %td %tT %tZ %tY, e.g. Fri Aug 16 18:51:33 Z 2019.

Examples

Not available in this language yet.
Not available in this language yet.
System.out.println(
  client.query(
    Let(
      Seq("ts" -> Time("2019-08-16T18:51:33.987654321+00:00")),
      Concat(
        Arr(
          Format("%nDecimals:"),
          Repeat("-=", 30),
          Format("                   normal: '%d'", 123),
          Format("                with sign: '%+d'", 123),
          Format("               with width: '%7d'", 123),
          Format("   with width, align left: '%-7d'", 123),
          Format("           as hexadecimal: '%x'", 123),
          Format("as hexadecimal, uppercase: '%X'", 123),
          Format("                 as octal: '%o'", 123),

          Format("%nFloats:"),
          Repeat("=-", 30),
          Format("                         normal: '%f'", 123.456789),
          Format("                     2 decimals: '%.2f'", 123.456789),
          Format("            scientific notation: '%e'", 123.456789),
          Format("scientific notation, 2 decimals: '%.2e'", 123.456789),
          Format(" scientific notation, uppercase: '%E'", 123.456789),
          Format("                             %%g: '%g'", 123.456789),
          Format("                 %%g, 2 decimals: '%.2g'", 123.456789),
          Format("                             %%G: '%g'", 123.456789),
          Format("                 %%G, 2 decimals: '%.2g'", 123.456789),

          Format("%nStrings:"),
          Repeat("-=", 30),
          Format("   normal: '%s'", "Fauna"),
          Format("uppercase: '%S'", "Fauna"),
          Format("     null: '%s'", Null),
          Format("       %%%%: '%%'"),
          Format("linefeed: %n"),

          Format("%nBooleans:"),
          Repeat("=-", 30),
          Format("            true: '%b'", true),
          Format(" true, uppercase: '%B'", 1),
          Format("           false: '%b'", false),
          Format("false, uppercase: '%B'", 0),

          Format("%nTimes and Dates:"),
          Repeat("-=", 30),
          Format("                    ISO-8601: %t", Var("ts")),
          Format("         ISO-8601, uppercase: %T", Var("ts")),
          Format(""),
          Format("             Full month name: %tB", Var("ts")),
          Format("  Full month name, uppercase: %TB", Var("ts")),
          Format("            Short month name: %tb", Var("ts")),
          Format(" Short month name, uppercase: %Tb", Var("ts")),
          Format("                          %%h: %th", Var("ts")),
          Format("               %%h, uppercase: %Tb", Var("ts")),
          Format("                Full weekday: %tA", Var("ts")),
          Format("     Full weekday, uppercase: %TA", Var("ts")),
          Format("               Short weekday: %ta", Var("ts")),
          Format("    Short weekday, uppercase: %Ta", Var("ts")),
          Format("                     Century: %tC", Var("ts")),
          Format("                        Year: %tY", Var("ts")),
          Format("                  Short year: %ty", Var("ts")),
          Format("             Day of the year: %tj", Var("ts")),
          Format("                       Month: %tm", Var("ts")),
          Format("            Day of the month: %td", Var("ts")),
          Format(""),

          Format("      Hour, leading 0's (24): %tH", Var("ts")),
          Format("      Hour, leading 0's (12): %tI", Var("ts")),
          Format("                   Hour (24): %tk", Var("ts")),
          Format("                   Hour (12): %tl", Var("ts")),
          Format("                      Minute: %tM", Var("ts")),
          Format("                      Second: %tS", Var("ts")),
          Format("                 Millisecond: %tL", Var("ts")),
          Format("                  Nanosecond: %tN", Var("ts")),
          Format("           Morning/afternoon: %tp", Var("ts")),
          Format("Morning/afternoon, uppercase: %Tp", Var("ts")),
          Format("         Seconds since epoch: %ts", Var("ts")),
          Format("    Milliseconds since epoch: %tQ", Var("ts")),
          Format(""),

          Format("                          %%R: %tR", Var("ts")),
          Format("                          %%T: %tT", Var("ts")),
          Format("                          %%r: %tr", Var("ts")),
          Format("                          %%D: %tD", Var("ts")),
          Format("                          %%F: %tF", Var("ts")),
          Format("                          %%c: %tc", Var("ts")),
          Format(""),
        ),
        "\n"
      )
    )
  ).get());
client.query(
    q.Let(
      { ts: q.Time("2019-08-16T18:51:33.987654321+00:00") },
      q.Concat(
        [
          q.Format("%nDecimals:"),
          q.Repeat("-=", 30),
          q.Format("                   normal: '%d'", 123),
          q.Format("                with sign: '%+d'", 123),
          q.Format("               with width: '%7d'", 123),
          q.Format("   with width, align left: '%-7d'", 123),
          q.Format("           as hexadecimal: '%x'", 123),
          q.Format("as hexadecimal, uppercase: '%X'", 123),
          q.Format("                 as octal: '%o'", 123),

          q.Format("%nFloats:"),
          q.Repeat("=-", 30),
          q.Format("                         normal: '%f'", 123.456789),
          q.Format("                     2 decimals: '%.2f'", 123.456789),
          q.Format("            scientific notation: '%e'", 123.456789),
          q.Format("scientific notation, 2 decimals: '%.2e'", 123.456789),
          q.Format(" scientific notation, uppercase: '%E'", 123.456789),
          q.Format("                             %%g: '%g'", 123.456789),
          q.Format("                 %%g, 2 decimals: '%.2g'", 123.456789),
          q.Format("                             %%G: '%g'", 123.456789),
          q.Format("                 %%G, 2 decimals: '%.2g'", 123.456789),

          q.Format("%nStrings:"),
          q.Repeat("-=", 30),
          q.Format("   normal: '%s'", "Fauna"),
          q.Format("uppercase: '%S'", "Fauna"),
          q.Format("     null: '%s'", null),
          q.Format("       %%%%: '%%'"),
          q.Format("linefeed: %n"),

          q.Format("%nBooleans:"),
          q.Repeat("=-", 30),
          q.Format("            true: '%b'", true),
          q.Format(" true, uppercase: '%B'", 1),
          q.Format("           false: '%b'", false),
          q.Format("false, uppercase: '%B'", 0),

          q.Format("%nTimes and Dates:"),
          q.Repeat("-=", 30),
          q.Format("                    ISO-8601: %t", q.Var("ts")),
          q.Format("         ISO-8601, uppercase: %T", q.Var("ts")),
          q.Format(""),
          q.Format("             Full month name: %tB", q.Var("ts")),
          q.Format("  Full month name, uppercase: %TB", q.Var("ts")),
          q.Format("            Short month name: %tb", q.Var("ts")),
          q.Format(" Short month name, uppercase: %Tb", q.Var("ts")),
          q.Format("                          %%h: %th", q.Var("ts")),
          q.Format("               %%h, uppercase: %Tb", q.Var("ts")),
          q.Format("                Full weekday: %tA", q.Var("ts")),
          q.Format("     Full weekday, uppercase: %TA", q.Var("ts")),
          q.Format("               Short weekday: %ta", q.Var("ts")),
          q.Format("    Short weekday, uppercase: %Ta", q.Var("ts")),
          q.Format("                     Century: %tC", q.Var("ts")),
          q.Format("                        Year: %tY", q.Var("ts")),
          q.Format("                  Short year: %ty", q.Var("ts")),
          q.Format("             Day of the year: %tj", q.Var("ts")),
          q.Format("                       Month: %tm", q.Var("ts")),
          q.Format("            Day of the month: %td", q.Var("ts")),
          q.Format(""),

          q.Format("      Hour, leading 0's (24): %tH", q.Var("ts")),
          q.Format("      Hour, leading 0's (12): %tI", q.Var("ts")),
          q.Format("                   Hour (24): %tk", q.Var("ts")),
          q.Format("                   Hour (12): %tl", q.Var("ts")),
          q.Format("                      Minute: %tM", q.Var("ts")),
          q.Format("                      Second: %tS", q.Var("ts")),
          q.Format("                 Millisecond: %tL", q.Var("ts")),
          q.Format("                  Nanosecond: %tN", q.Var("ts")),
          q.Format("           Morning/afternoon: %tp", q.Var("ts")),
          q.Format("Morning/afternoon, uppercase: %Tp", q.Var("ts")),
          q.Format("         Seconds since epoch: %ts", q.Var("ts")),
          q.Format("    Milliseconds since epoch: %tQ", q.Var("ts")),
          q.Format(""),

          q.Format("                          %%R: %tR", q.Var("ts")),
          q.Format("                          %%T: %tT", q.Var("ts")),
          q.Format("                          %%r: %tr", q.Var("ts")),
          q.Format("                          %%D: %tD", q.Var("ts")),
          q.Format("                          %%F: %tF", q.Var("ts")),
          q.Format("                          %%c: %tc", q.Var("ts")),
          q.Format(""),
        ],
        "\n"
      )
    )
)
.then(ret => console.log(ret))
Not available in this language yet.
Not available in this language yet.
println(Await.result(
  client.query(
    Let(
      Seq("ts" -> Time("2019-08-16T18:51:33.987654321+00:00")),
      Concat(
        Arr(
          Format("%nDecimals:"),
          Repeat("-=", 30),
          Format("                   normal: '%d'", 123),
          Format("                with sign: '%+d'", 123),
          Format("               with width: '%7d'", 123),
          Format("   with width, align left: '%-7d'", 123),
          Format("           as hexadecimal: '%x'", 123),
          Format("as hexadecimal, uppercase: '%X'", 123),
          Format("                 as octal: '%o'", 123),

          Format("%nFloats:"),
          Repeat("=-", 30),
          Format("                         normal: '%f'", 123.456789),
          Format("                     2 decimals: '%.2f'", 123.456789),
          Format("            scientific notation: '%e'", 123.456789),
          Format("scientific notation, 2 decimals: '%.2e'", 123.456789),
          Format(" scientific notation, uppercase: '%E'", 123.456789),
          Format("                             %%g: '%g'", 123.456789),
          Format("                 %%g, 2 decimals: '%.2g'", 123.456789),
          Format("                             %%G: '%g'", 123.456789),
          Format("                 %%G, 2 decimals: '%.2g'", 123.456789),

          Format("%nStrings:"),
          Repeat("-=", 30),
          Format("   normal: '%s'", "Fauna"),
          Format("uppercase: '%S'", "Fauna"),
          Format("     null: '%s'", Null),
          Format("       %%%%: '%%'"),
          Format("linefeed: %n"),

          Format("%nBooleans:"),
          Repeat("=-", 30),
          Format("            true: '%b'", true),
          Format(" true, uppercase: '%B'", 1),
          Format("           false: '%b'", false),
          Format("false, uppercase: '%B'", 0),

          Format("%nTimes and Dates:"),
          Repeat("-=", 30),
          Format("                    ISO-8601: %t", Var("ts")),
          Format("         ISO-8601, uppercase: %T", Var("ts")),
          Format(""),
          Format("             Full month name: %tB", Var("ts")),
          Format("  Full month name, uppercase: %TB", Var("ts")),
          Format("            Short month name: %tb", Var("ts")),
          Format(" Short month name, uppercase: %Tb", Var("ts")),
          Format("                          %%h: %th", Var("ts")),
          Format("               %%h, uppercase: %Tb", Var("ts")),
          Format("                Full weekday: %tA", Var("ts")),
          Format("     Full weekday, uppercase: %TA", Var("ts")),
          Format("               Short weekday: %ta", Var("ts")),
          Format("    Short weekday, uppercase: %Ta", Var("ts")),
          Format("                     Century: %tC", Var("ts")),
          Format("                        Year: %tY", Var("ts")),
          Format("                  Short year: %ty", Var("ts")),
          Format("             Day of the year: %tj", Var("ts")),
          Format("                       Month: %tm", Var("ts")),
          Format("            Day of the month: %td", Var("ts")),
          Format(""),

          Format("      Hour, leading 0's (24): %tH", Var("ts")),
          Format("      Hour, leading 0's (12): %tI", Var("ts")),
          Format("                   Hour (24): %tk", Var("ts")),
          Format("                   Hour (12): %tl", Var("ts")),
          Format("                      Minute: %tM", Var("ts")),
          Format("                      Second: %tS", Var("ts")),
          Format("                 Millisecond: %tL", Var("ts")),
          Format("                  Nanosecond: %tN", Var("ts")),
          Format("           Morning/afternoon: %tp", Var("ts")),
          Format("Morning/afternoon, uppercase: %Tp", Var("ts")),
          Format("         Seconds since epoch: %ts", Var("ts")),
          Format("    Milliseconds since epoch: %tQ", Var("ts")),
          Format(""),

          Format("                          %%R: %tR", Var("ts")),
          Format("                          %%T: %tT", Var("ts")),
          Format("                          %%r: %tr", Var("ts")),
          Format("                          %%D: %tD", Var("ts")),
          Format("                          %%F: %tF", Var("ts")),
          Format("                          %%c: %tc", Var("ts")),
          Format(""),
        ),
        "\n"
      )
    )
  ),
  5.seconds
))
Not available in this language yet.
"
Decimals:
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
                   normal: '123'
                with sign: '+123'
               with width: '    123'
   with width, align left: '123    '
           as hexadecimal: '7b'
as hexadecimal, uppercase: '7B'
                 as octal: '173'

Floats:
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
                         normal: '123.456789'
                     2 decimals: '123.46'
            scientific notation: '1.234568e+02'
scientific notation, 2 decimals: '1.23e+02'
 scientific notation, uppercase: '1.234568E+02'
                             %g: '123.457'
                 %g, 2 decimals: '1.2e+02'
                             %G: '123.457'
                 %G, 2 decimals: '1.2e+02'

Strings:
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
   normal: 'Fauna'
uppercase: 'FAUNA'
     null: 'null'
       %%: '%'
linefeed:


Booleans:
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
            true: 'true'
 true, uppercase: 'TRUE'
           false: 'false'
false, uppercase: 'TRUE'

Times and Dates:
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
                    ISO-8601: 2019-08-16T18:51:33.987654321Z
         ISO-8601, uppercase: 2019-08-16T18:51:33.987654321Z

             Full month name: August
  Full month name, uppercase: AUGUST
            Short month name: Aug
 Short month name, uppercase: AUG
                          %h: Aug
               %h, uppercase: AUG
                Full weekday: Friday
     Full weekday, uppercase: FRIDAY
               Short weekday: Fri
    Short weekday, uppercase: FRI
                     Century: 20
                        Year: 2019
                  Short year: 19
             Day of the year: 228
                       Month: 08
            Day of the month: 16

      Hour, leading 0's (24): 18
      Hour, leading 0's (12): 06
                   Hour (24): 18
                   Hour (12): 6
                      Minute: 51
                      Second: 33
                 Millisecond: 987
                  Nanosecond: 987654321
           Morning/afternoon: pm
Morning/afternoon, uppercase: PM
         Seconds since epoch: 1565981493
    Milliseconds since epoch: 1565981493987

                          %R: 18:51
                          %T: 18:51:33
                          %r: 06:51:33 PM
                          %D: 08/16/19
                          %F: 2019-08-16
                          %c: Fri Aug 16 18:51:33 Z 2019
"
Decimals:
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
                   normal: '123'
                with sign: '+123'
               with width: '    123'
   with width, align left: '123    '
           as hexadecimal: '7b'
as hexadecimal, uppercase: '7B'
                 as octal: '173'

Floats:
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
                         normal: '123.456789'
                     2 decimals: '123.46'
            scientific notation: '1.234568e+02'
scientific notation, 2 decimals: '1.23e+02'
 scientific notation, uppercase: '1.234568E+02'
                             %g: '123.457'
                 %g, 2 decimals: '1.2e+02'
                             %G: '123.457'
                 %G, 2 decimals: '1.2e+02'

Strings:
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
   normal: 'Fauna'
uppercase: 'FAUNA'
     null: 'null'
       %%: '%'
linefeed:


Booleans:
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
            true: 'true'
 true, uppercase: 'TRUE'
           false: 'false'
false, uppercase: 'TRUE'

Times and Dates:
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
                    ISO-8601: 2019-08-16T18:51:33.987654321Z
         ISO-8601, uppercase: 2019-08-16T18:51:33.987654321Z

             Full month name: August
  Full month name, uppercase: AUGUST
            Short month name: Aug
 Short month name, uppercase: AUG
                          %h: Aug
               %h, uppercase: AUG
                Full weekday: Friday
     Full weekday, uppercase: FRIDAY
               Short weekday: Fri
    Short weekday, uppercase: FRI
                     Century: 20
                        Year: 2019
                  Short year: 19
             Day of the year: 228
                       Month: 08
            Day of the month: 16

      Hour, leading 0's (24): 18
      Hour, leading 0's (12): 06
                   Hour (24): 18
                   Hour (12): 6
                      Minute: 51
                      Second: 33
                 Millisecond: 987
                  Nanosecond: 987654321
           Morning/afternoon: pm
Morning/afternoon, uppercase: PM
         Seconds since epoch: 1565981493
    Milliseconds since epoch: 1565981493987

                          %R: 18:51
                          %T: 18:51:33
                          %r: 06:51:33 PM
                          %D: 08/16/19
                          %F: 2019-08-16
                          %c: Fri Aug 16 18:51:33 Z 2019
"
Decimals:
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
                   normal: '123'
                with sign: '+123'
               with width: '    123'
   with width, align left: '123    '
           as hexadecimal: '7b'
as hexadecimal, uppercase: '7B'
                 as octal: '173'

Floats:
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
                         normal: '123.456789'
                     2 decimals: '123.46'
            scientific notation: '1.234568e+02'
scientific notation, 2 decimals: '1.23e+02'
 scientific notation, uppercase: '1.234568E+02'
                             %g: '123.457'
                 %g, 2 decimals: '1.2e+02'
                             %G: '123.457'
                 %G, 2 decimals: '1.2e+02'

Strings:
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
   normal: 'Fauna'
uppercase: 'FAUNA'
     null: 'null'
       %%: '%'
linefeed:


Booleans:
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
            true: 'true'
 true, uppercase: 'TRUE'
           false: 'false'
false, uppercase: 'TRUE'

Times and Dates:
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
                    ISO-8601: 2019-08-16T18:51:33.987654321Z
         ISO-8601, uppercase: 2019-08-16T18:51:33.987654321Z

             Full month name: August
  Full month name, uppercase: AUGUST
            Short month name: Aug
 Short month name, uppercase: AUG
                          %h: Aug
               %h, uppercase: AUG
                Full weekday: Friday
     Full weekday, uppercase: FRIDAY
               Short weekday: Fri
    Short weekday, uppercase: FRI
                     Century: 20
                        Year: 2019
                  Short year: 19
             Day of the year: 228
                       Month: 08
            Day of the month: 16

      Hour, leading 0's (24): 18
      Hour, leading 0's (12): 06
                   Hour (24): 18
                   Hour (12): 6
                      Minute: 51
                      Second: 33
                 Millisecond: 987
                  Nanosecond: 987654321
           Morning/afternoon: pm
Morning/afternoon, uppercase: PM
         Seconds since epoch: 1565981493
    Milliseconds since epoch: 1565981493987

                          %R: 18:51
                          %T: 18:51:33
                          %r: 06:51:33 PM
                          %D: 08/16/19
                          %F: 2019-08-16
                          %c: Fri Aug 16 18:51:33 Z 2019
"

Was this article helpful?

We're sorry to hear that.
Tell us how we can improve! documentation@fauna.com

Thank you for your feedback!