> ## Documentation Index
> Fetch the complete documentation index at: https://clickhouse.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# cast_string_* session settings

> ClickHouse session settings in the cast_string_* generated group.

export const SettingsInfoBlock = ({type, default_value, changeable_without_restart}) => {
  return <div className="not-prose" style={{
    display: "flex",
    flexWrap: "wrap",
    alignItems: "baseline",
    columnGap: "0.5rem",
    rowGap: "0.125rem",
    margin: "0.375rem 0",
    fontSize: "0.8125rem",
    lineHeight: "1.125rem"
  }}>
      <div style={{
    fontWeight: 600,
    opacity: 0.72
  }}>Type</div>
      <div style={{
    overflowWrap: "anywhere"
  }}>{type}</div>
      <div style={{
    fontWeight: 600,
    opacity: 0.72,
    marginInlineStart: "0.5rem"
  }}>Default</div>
      <div style={{
    overflowWrap: "anywhere"
  }}>{default_value}</div>
      {changeable_without_restart && <div style={{
    fontWeight: 600,
    opacity: 0.72,
    marginInlineStart: "0.5rem"
  }}>
          Changeable without restart
        </div>}
      {changeable_without_restart && <div style={{
    overflowWrap: "anywhere"
  }}>
          {changeable_without_restart}
        </div>}
    </div>;
};

These settings are available in [system.settings](/docs/reference/system-tables/settings) and are autogenerated from [source](https://github.com/ClickHouse/ClickHouse/blob/master/src/Core/Settings.cpp).

<h2 id="cast_string_to_date_time_mode">
  cast\_string\_to\_date\_time\_mode
</h2>

<SettingsInfoBlock type="DateTimeInputFormat" default_value="best_effort" />

<VersionHistory rows={[{"id": "row-1","items": [{"label": "26.5"},{"label": "best_effort"},{"label": "Better usability"}]}, {"id": "row-2","items": [{"label": "25.6"},{"label": "basic"},{"label": "Allow to use different DateTime parsing mode in String to DateTime cast"}]}]} />

Allows choosing a parser of the text representation of date and time during cast from String.

Possible values:

* `'best_effort'` — Enables extended parsing.

  ClickHouse can parse the basic `YYYY-MM-DD HH:MM:SS` format and all [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time formats. For example, `'2018-06-08T01:02:03.000Z'`.

* `'best_effort_us'` — Similar to `best_effort` (see the difference in [parseDateTimeBestEffortUS](/docs/reference/functions/regular-functions/type-conversion-functions#parseDateTimeBestEffortUS)

* `'basic'` — Use basic parser.

  ClickHouse can parse only the basic `YYYY-MM-DD HH:MM:SS` or `YYYY-MM-DD` format. For example, `2019-08-20 10:18:56` or `2019-08-20`.

See also:

* [DateTime data type.](/docs/reference/data-types/datetime)
* [Functions for working with dates and times.](/docs/reference/functions/regular-functions/date-time-functions)

<h2 id="cast_string_to_dynamic_use_inference">
  cast\_string\_to\_dynamic\_use\_inference
</h2>

<SettingsInfoBlock type="Bool" default_value="0" />

<VersionHistory rows={[{"id": "row-1","items": [{"label": "24.5"},{"label": "0"},{"label": "Add setting to allow converting String to Dynamic through parsing"}]}]} />

Use types inference during String to Dynamic conversio

<h2 id="cast_string_to_variant_use_inference">
  cast\_string\_to\_variant\_use\_inference
</h2>

<SettingsInfoBlock type="Bool" default_value="1" />

<VersionHistory rows={[{"id": "row-1","items": [{"label": "25.4"},{"label": "1"},{"label": "New setting to enable\/disable types inference during CAST from String to Variant"}]}]} />

Use types inference during String to Variant conversion.
