# CustomSpecifier
{: .no_toc }

Returns or sets the text of a format item that follows its identifier letter.

## Get

Returns a **String**.

Syntax: *object*.**CustomSpecifier**

*object*
: *required* An object expression that evaluates to a **StringFormatSpecifier**.

The default value is an empty string.

## Let

Sets the text, and sets [**Precision**](/tB/Packages/Contributed/Fmt/StringFormatSpecifier/Precision.md) when the text is a non-zero number.

Syntax: *object*.**CustomSpecifier** **=** *value*

*value*
: A **String**. For `{0:F2}` it is `2`, for `{0:Cyyyy-MM-dd}` it is `yyyy-MM-dd`.

## Remarks

The text is stored as written. When it is numeric and not zero, [**Precision**](/tB/Packages/Contributed/Fmt/StringFormatSpecifier/Precision.md) takes the value as well. When it is not, [**Precision**](/tB/Packages/Contributed/Fmt/StringFormatSpecifier/Precision.md) is left as it was: assigning `"abc"` or `"0"` does not reset an earlier precision to zero.

The meaning of the text belongs to the format identifier class. The numeric classes read it as a precision through [**Precision**](/tB/Packages/Contributed/Fmt/StringFormatSpecifier/Precision.md). [**GenericDateTimeSFI**](/tB/Packages/Contributed/Fmt/GenericDateTimeSFI.md) passes it to **Format$** as a custom date and time format when the identifier is `C`.

## Example

```tb check_build check_run
Dim spec As New StringFormatSpecifier
spec.identifier = "F"
spec.CustomSpecifier = "3"
Debug.Print spec.Precision          ' 3

spec.CustomSpecifier = "abc"
Debug.Print spec.Precision          ' 3
Debug.Print spec.CustomSpecifier    ' abc
```

## See Also

- [Precision](/tB/Packages/Contributed/Fmt/StringFormatSpecifier/Precision.md) property -- the numeric reading of the text
- [identifier](/tB/Packages/Contributed/Fmt/StringFormatSpecifier/identifier.md) property -- the letter in front of the text
- [ToString](/tB/Packages/Contributed/Fmt/StringFormatSpecifier/ToString.md) method -- includes the text
- [StringFormatSpecifier](/tB/Packages/Contributed/Fmt/StringFormatSpecifier/index.md) class -- overview
