# DateTimeSFI class
{: .no_toc }

Formats a **Date** for the same identifiers as **GenericDateTimeSFI**, but is not registered with **StringHelper**.

**DateTimeSFI** is a format identifier class. It implements [**IStringFormatIdentifier**](/tB/Packages/Contributed/Fmt/IStringFormatIdentifier.md) and contains the same code as [**GenericDateTimeSFI**](/tB/Packages/Contributed/Fmt/GenericDateTimeSFI.md): the identifiers **d**, **D**, **f**, **F**, **g**, **G**, **s**, **t**, **T** and **C** give the same results, and any other identifier does not match. The table of identifiers is on the [**GenericDateTimeSFI**](/tB/Packages/Contributed/Fmt/GenericDateTimeSFI.md#identifiers) page.

[**StringHelper**](/tB/Packages/Contributed/Fmt/StringHelper.md) registers **GenericDateTimeSFI** and not this class, so [**StringFormat**](/tB/Packages/Contributed/Fmt/PublicEntryPoints/StringFormat.md) never calls it. Code that calls the format identifier classes directly can use it. The class is predeclared, and its two members are reached through the interface.

```tb check_build check_run
Dim spec As New StringFormatSpecifier
spec.identifier = "d"

Dim f As IStringFormatIdentifier
Set f = DateTimeSFI
Debug.Print f.IsIdentifierMatch(spec)  ' True

spec.identifier = "q"
Debug.Print f.IsIdentifierMatch(spec)  ' False

spec.identifier = "C"
spec.CustomSpecifier = "yyyy-MM-dd"
Debug.Print f.GetFormattedValue(#2026-10-11 14:05:09#, spec)  ' 2026-10-11
```

## Members

- **IsIdentifierMatch** returns **True** when the specifier's [**identifier**](/tB/Packages/Contributed/Fmt/StringFormatSpecifier/identifier.md) is `C` or `c`, or is one of the other nine letters.
- **GetFormattedValue** returns the value formatted by the identifier. With `C` it uses the specifier's [**CustomSpecifier**](/tB/Packages/Contributed/Fmt/StringFormatSpecifier/CustomSpecifier.md).

Both are implemented as private members of the interface.

## See Also

- [IStringFormatIdentifier](/tB/Packages/Contributed/Fmt/IStringFormatIdentifier.md) interface -- the contract every format identifier class implements
- [GenericDateTimeSFI](/tB/Packages/Contributed/Fmt/GenericDateTimeSFI.md) class -- the registered date and time identifier
- [Fmt package](/tB/Packages/Contributed/Fmt/index.md) -- overview, with the table of identifiers
