Prevent timestamps and date-like tokens from being auto-typed.

Section: Scalar gotchas

Quote date-like values

yaml
yaml
release: "2026-03-28"
Explanation

Quote values when you need them treated as strings instead of dates or timestamps.

Learn the surrounding workflow

Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.

Related commands

Same sheet · prioritizing Scalar gotchas
Quote ambiguous boolean-like words
Avoid implicit booleans by quoting risky strings.
OpenIn sheetyamlsame section
Read a scalar with yq
Extract a single value from a YAML file.
OpenIn sheetbashsame section
Update a scalar with yq
Modify a YAML field in place.
OpenIn sheetbashsame section
Plain string
Use an unquoted scalar when no escaping is needed.
OpenIn sheetyaml1 tag match
Single-quoted string
Keep backslashes literal and avoid interpolation-like behavior.
OpenIn sheetyaml1 tag match
Double-quoted string
Use escapes like newline and tab in YAML strings.
OpenIn sheetyaml1 tag match