Expression.Constant

Syntax

Expression.Constant(value as any) as text

About

Returns the M source code representation of a constant value.

Example 1

Get the M source code representation of a number value.

Usage

Expression.Constant(123)

Output

"123"

Example 2

Get the M source code representation of a date value.

Usage

Expression.Constant(#date(2035, 01, 02))

Output

"#date(2035, 1, 2)"

Example 3

Get the M source code representation of a text value.

Usage

Expression.Constant("abc")

Output

"""abc"""